I faced similar problem:
use the following:
if(null==pq2)
..
Further code.

Hope this will help
--
RAVIKUMAR CHENGALVALA
[EMAIL PROTECTED] - email
(858) 860-6400 x7011 - voicemail/fax



---- "Lambert, Stephen : CO IR" <[EMAIL PROTECTED]> wrote:
> I'm trying to pass blanks for a null into my db from an html form.
> Code as follows:
>
> String pQ2 = request.getParameter("check2");
> if  (pQ2.equals("null") {pQ2="";
> }
>
> I end up with the error "java.lang.NullPointerException".
> Even though when I display the variable pQ2,  it gives me "null"(no
> quotes)
> using:
>
> out.println(pQ2);
>
> Anybody know how to check for null data from a doPost method?
> Thanks,
> Stephen.
>
> ___________________________________________________________________________
> 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
>

__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.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

Reply via email to