Hello Kerem,
getParameter() is case sensitive so your
req.getParameter("password") or req.getParameter("user") etc must match the
names given in the actual HTML page. I think you have not so the
NUllPointerException.
bye,
Jiger
>From: Kerem �KTEM <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: null pointer exception
>Date: Sun, 23 Jul 2000 04:58:35 +0300
>
>hi,
>i know what null pointer exection means but can you suggest me something to
>do in this case.
>
>servlet code includes this
>
>String password=req.getParameter("password");
>String user =req.getParameter("user");
>String error=req.getParameter("error");
>
>if (password.equals("forgot"))
> go to password forgot page (servletname?password=forgot)
>if (user.equals("new"))
> go to the new user sign in page (servlet?user=new)
>
>and also i don't want people to to access (servletname)
>which i think would be suitablt this code
>
>(if password.equals("")&&user.equals(""))
> go to log in page
>likely
>when
>(if password.equals("forgot")&&user.equals("new"))
> go to log in page
>
>all these if statements turn me with null pointer exeception
>PLEASE HELP ME
>
>cause i am gettting much angry about this i have to work with datbase too
>tahnx
>
>Kerem
>
>___________________________________________________________________________
>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
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
___________________________________________________________________________
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