if statements won't recognize variables!
Hi guys. I am pretty new to servlets, so please bear with me.
I have a servlet up and running that is properly displaying posts from my html code properly (i.e. I get values for "actionString" and "weight"). However, when I try to use an if statement to display the message "you made it." , it doesn't work. What is happening here?
String actionString = request.getParameter("action");
String weight2 = request.getParameter("weight");
out.println("the actionString is: " + actionString);
out.println("the weight is: " + weight2);
String question3a;
question3a ="1";
if(actionString == question3a){
out.println("you made it.");
}
Thanks,
Nathan

