Sorry that was supposed to be:

if(!(password.equals("")) || !(null == password))
{
   do some stuff
}


----- Original Message -----
From: John McDonald <[EMAIL PROTECTED]>
To: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. <[EMAIL PROTECTED]>
Sent: Wednesday, January 12, 2000 8:06 PM
Subject: Re: checking for null password


> Try this:
>
> if(password.equals("") || !(null == password))
> {
>    do some stuff
> }
>
> John D. McDonald
> CipherStream Systems
> Phone: 925.373.8700
> Fax:     413.793.6603
> email: [EMAIL PROTECTED]
> web: www.cipherstream.com
> -------------------------------------------------------
> Secure E-Business Is Our Business
> -------------------------------------------------------
> ----- Original Message -----
> From: Harish Satyanarayanrao <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 12, 2000 4:08 PM
> 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