Hi I am getting a form field (POSTed form) as
String user = (String) request.getParameter("user");
When I out.print this, it writes the correct value, but when i COMPARE this
in an IF condition, it doesnt work. Any reason why? For example, lets say
the "user" textfield in my form is "admin".
Now when I grab it using getParameter, the value printed out is admin!! But
when I do this condition:
if (user == "admin")
{
}
then it doesnt go into this condition, but goes into the ELSE instead!!!
Why is this?
Would appreciate any help..thanks!!
- RE: getParameter is NOT a string? Winnie Cheung
- RE: getParameter is NOT a string? CPC Livelink Admin
- RE: getParameter is NOT a string? Cliff Rowley
- RE: getParameter is NOT a string? Brett Bergquist
- Re: getParameter is NOT a string? Kurt Bernhard Pruenner
- Re: getParameter is NOT a string? Miles Daffin
- Re: getParameter is NOT a str... Charles Forsythe
- Re: getParameter is NOT a... Miles Daffin
- RE: getParameter is NOT a string? Brett Bergquist
- Re: getParameter is NOT a string? Miles Daffin
- Re: getParameter is NOT a string? JTBldrCO
