permaculture playing cards*
The moose likes Tomcat and the fly likes Tomcat problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat problem" Watch "Tomcat problem" New topic

Tomcat problem

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Am using tomcat 401 and whenever any field value is an empty strin tomcat treats it as null string....whereas Weblogic treats as an empty string.
In my validation if I check the particaular value as empty strin it passes thru in weblogic , but doesn't in tomcat..
Is there any change i need to make to trea the empty string as an empty string not as null in tomcat
Response is highly appreciated
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952

To the best of my knowledge, if you do a request.getParameter() and pass it the name of an item not defined in the request, it should come up null whether you're running WebLogic OR Tomcat.
If it doesn't then WebLogic is in violation of the official JavaDocs, which explicitly state that undefined parameter queries will return null.
But last time I checked WebLogic was returning null, just like it should.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: Tomcat problem
Similar Threads
jsp - hidden element - null to empty string
problem with JSTL
JSP parameter displays null String instead of empty string
Garbage collection
Performance factor in using equals Vs comareTo