> if( name != null && name.trim().length() != 0 ){
> do something...
> }
> As above shows, I'm checking the name variable is either null or not.
> Is this wasting ??
>From the JavaDocs of J2EE 1.3, about HttpRequest.getParameter():
"Returns the value of a request parameter as a String, or null if the
parameter does not exist."
An empty string in Java is different than NULL. Means, that you can have a
valid String object,
which its value is none (empty string).
The "name" parameter will pass with the request, and will be translated as
an empty string in case
you don't write anything in the box.
- Isaac
___________________________________________________________________________
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