Hi there,
This is Fumitada.
I've made a way simple jsp retreiving one parameter and html...
< a snippet of my HTML code>
....
<form action="/test1.jsp" method=post >
<input type=text name=name size=20>
<input type=submit name=submit value=submit>
</form>
...
< a snippet of my JSP code >
...
String name = request.getParameter("name");
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 ??
How come I think this is even though I don't type in anything in the
form of the html and click submit button, the name variable in the JSP
code gets Length-0-String object...
if the variable never get null, I don't have to check the variable is
null or not.
but I'm NOT sure, so I'm asking this, anybody knows the variable from
HTML form never be NULL ??
Thank you.
Fumitada.
___________________________________________________________________________
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