[thelist] JSP fumbling.....

Anthony Baratta Anthony at Baratta.com
Sat Nov 16 20:41:01 CST 2002


Why does this *always* evaluate to false??

   String HTTPMethod = request.getMethod();
   if (HTTPMethod == "POST") {
      System.out.println("True");
   } else {
      System.out.println("False");
   }

Yet

      System.out.println(HTTPMethod);

On a form submit prints POST.

I'm stumped.
---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."




More information about the thelist mailing list