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!!

Reply via email to