You mean like...
 
String myValue = req.getParameter("value");
 
if (myValue != null)
{
    ...continue execution
}
 
                                                                                                       
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of John McDonald
Sent: Wednesday, January 05, 2000 4:03 PM
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]
web: www.cipherstream.com
-------------------------------------------------------
Secure E-Business Is Our Business
-------------------------------------------------------

Reply via email to