aspose file tools*
The moose likes Servlets and the fly likes Default Value of Text Element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Default Value of Text Element" Watch "Default Value of Text Element" New topic
Author

Default Value of Text Element

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

When processing a request in a servlet and I say
String text1 = request.getParameter("textfield1");
And textfield1 has no value, will text1 be null or "" ?


GenRocket - Experts at Building Test Data
ritchie diputado
Greenhorn

Joined: Sep 19, 2003
Posts: 5
the value will be "".
if textfield1 does not exist on the request the value will be null.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Perfect, that is what I was hoping for. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Default Value of Text Element