Try if (pwsd.equals(""))

*or*

if (pwsd.trim().equals(""))

these should work.

regds
-mukul

At 05:08 PM 1/12/00 MST, you wrote:
>Hi,
>
>I have a problem in a servlet which i wrote.
>
>The servlet accepts a username and password from a HTML form.
>
>I am accessing the same using getParameter function in the doGet function.
>
>String pwsd = request.getParamater("PASSWORD");
>
>To check if the user pressed the submit button without entering the password,
>I tried
>if (pswd==null) {//show the login page again with a error message}
>
>The program does not enter this if loop .
>(The string pswd is getting assigned a value if i do enter the password in
the
>HTML form)
>
>Am i missing something?
>
>Harish


--------------------------------------------------------------
Bharti Cellular Limited, New Delhi, India

___________________________________________________________________________
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