Posted By:
Jesse_Uribe
Posted On:
Tuesday, December 11, 2001 09:10 PM
I sure hope somebody can help me figure this out! I new to servlets and this is my first one trying to use form data Here's part of testform.html: ************************************* And here's part of testform.java: *********************************** username=request.getParameter("username"); out.println("Username=""+username+"" "); if (username=="USER"){ out.println("Hello User"); } else{ out.println("Your Not User"); } And here's the
More>>
I sure hope somebody can help me figure this out!
I new to servlets and this is my first one trying to use form data
Here's part of testform.html:
*************************************
And here's part of testform.java:
***********************************
username=request.getParameter("username");
out.println("Username=""+username+""
");
if (username=="USER"){
out.println("Hello User");
}
else{
out.println("Your Not User");
}
And here's the result when I click the submit button:
************************************
Username="USER"
Your not User
Anybody know why, the output even says username="USER" but I can't get the "Hello User" I should. please help out, i'm using jdk1.3 in linux (I have tried jdk1.2 with the same result) Is it a bug?
<<Less