john:

this might help:

Enumeration e = req.getParameterNames();

    if (e.hasMoreElements())
    {
       while (e.hasMoreElements())
        {
          pname = (String)e.nextElement();
         this.put(pname,req.getParameter(pname));
       }
    }

it cycles through the request parameters and stores the parameter name and
value in a class that extends properties.

-----Original Message-----
From: John McDonald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 25 November 1999 8:36
To: [EMAIL PROTECTED]
Subject: getParameter() != null


Can anyone please tell me how I look for a null value parameter. What I have
is an if loop that iterates through the unknown quantity of parameters(I've
assinged numbers as the names of the parameters). I want to be able to tell
the loop to break when I've come to a null parameter value(hence the last
parameter). I am able to get the value, from the parameter, back as null but
for some reason I can't write a boolean that will return true. I've tried
ALL of the following:

if(req.getParameter(nameOfParam) != null)
if(req.getParameter(nameOfParam) != (null))
if(req.getParameter(nameOfParam) != ("null"))
if(!(req.getParameter(nameOfParam) == null))

String temp = req.getParameter(nameOfParam);
if(temp != null)
if(temp != (null))
if(temp != ("null"))
if(!(temp == null))

NONE of these return true. What the HECK am I doing wrong?

I'd apprecate any help. Thanks

John D. McDonald
CipherStream Systems
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

Reply via email to