Hi,
Can't you simply check for a null return?
i.e.
String returnValue = req.getParameter("value");
if(null != returnValue) {
// use returnValue here
} else {
// avoid using it here
}
Regards,
Mark
> -----Original Message-----
> From: John McDonald [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, 6 January 2000 10:03
> To: [EMAIL PROTECTED]
> Subject: Checking for null
>
> I am retrieving a value from a web page with req.getParameter("value").
> How do I check if the string is null without getting a null pointer
> exception. Any ideas would be helpful.
>
>
> John D. McDonald
> CipherStream Systems
> Phone: 925.373.8700
> Fax: 413.793.6603
> email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> web: www.cipherstream.com <http://www.cipherstream.com>
> -------------------------------------------------------
> Secure E-Business Is Our Business
> -------------------------------------------------------
___________________________________________________________________________
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