Please try
if(request.getParameter("<parameter_name>").equals(""))
{
//stuff
}
Hope this will help.
Dima.
Tony Leake wrote:
> Hi,
>
> I'm trying to test a parameter to see if it exists:
>
> on page 1 i have a form with a text field
>
> <input type="text" name="thread">
>
> on page 2 i want to test if the box was filled in and if it contains a
> string or a number. I can't even seem to test if thread is empty.
>
> I've tried
>
> if(request.getParameter("sub")=="")
> {
> //stuff
> }
> but that doesn't seem to do anything.
>
> thanks for any help
> Tony
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> 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
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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