>  if (request.getParameter("val") == "1")

In Java, the '==' operator does an identity comparison -- that is, two
object references are equal only if they refer to the same object.

To lexically compare two strings, do something like:

if (request.getParameter("val") != null &&
request.getParameter("val").equals("1"))
{
...
}

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to