>>> Peter Tierney <[EMAIL PROTECTED]> 24-Jan-00 7:17:25 AM
>>>


Oh BTW:

You can't do this in Java:

if (req.getParameter("radio1") == "y") {
    out.println("Yes");
}
else {
    out.println("No");
}


Because == is designed to test equality, and *not* likeness
(similarity). That means that, to be ==, 2 references have to refer to
exactly the same object. It's no good saying that 2 strings are
exactly the same, they're not in Java - they're 2 different strings.

What you should be doing is this:

String radio=req.getParameter("radio1");
if(radio!=null && radio.equals("y") )
{
/etc....



This is kinda basic Java. The whole object thing (as a Perley you
don't have to think about that sort of thing much - which rather
ironically allways gets me into trouble in Perl!).


Nic Ferrier

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to