if((pswd==null) || (pswd.equals(""))
{

}
test like this. then you will know.

-----Original Message-----
From: Harish Satyanarayanrao [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 12, 2000 7:08 PM
To: [EMAIL PROTECTED]
Subject: checking for null password


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


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

___________________________________________________________________________
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

___________________________________________________________________________
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