[thelist] JSP fumbling.....
David Bindel
dbindel at austin.rr.com
Sat Nov 16 21:02:01 CST 2002
I have never used Java Server Pages before, but like C++, I believe that
Java lacks built-in string comparing operators. For example, in C++, you
must use strcmp() to compare strings. Perhaps Java has something similar,
but since I am not very familiar with it...
HTH,
David Bindel
> -----Original Message-----
> 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
More information about the thelist
mailing list