Harish Satyanarayanrao 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
>
> ____________________________________________________________________
> 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

Try using equals of String class.
--

-Regards
Charan Kumar



  ****Be Positive, u can't achieve anything by being negative****

************************************************************
Charan Kumar.K
Oracle Corporation (IDC).
Bangalore
Phone (0) 2283004-7
      (r) 5613362
************************************************************

___________________________________________________________________________
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