Maybe Simple newbie java question would be better subject for the email that
you sent to this jsp list.
What problem you are facing has nothing to do with jsp but with java on the
whole.
Please try to understand the difference in behaviour between the == operator
when it is applied to String objects.
In case of string objects, == operator checks for whether the two object
references are equal whereas the overridden equals() method of the String
class checks for the equality of the contents.
In your case as you would agree you want to check the contents, hence use
the equals() method.
Please refer to a java book for more details it would be helpful for you as
well as other people on this list.
Just a small piece of advice :-).
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com
----- Original Message -----
From: Tony Leake <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2001 7:11 PM
Subject: Simple newbie question
> 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")=="")
> {
> file://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