You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Molloy <MM...@ncycles.com> on 2005/04/12 14:45:47 UTC

Null printed in jsp getProperty fields

Hello everyone. I can't imagine that this isn't a question that has been
asked a great many times, but I can't find the answer anywhere.
 
We're using multiple tomcat 4.1.30 servers in a production environment
for a commercial website, and we would like to move up to the latest
stable version. However, when testing our application in tomcat 5.0+, we
have noticed that jsp pages that use the <jsp:getProperty /> method to
display session data print the word "null" in every field that has a
null value.
 
Although I haven't read about this, I'm guessing it is part of the Sun's
application server standard. I've been told that WebLogic does the same
thing, but that there is a configuration setting to repress displaying
the word null.
 
Is there such a setting for tomcat? If not, what is the best way to keep
from printing "null" in every field that has a null value? I know we
could do it through javascript, but it just seems like a change this
big, after years of not having this behaviour, there must be some way to
prevent it from happening at the application server level.
 
Can someone point me in the right direction? I've googled for the
answer, but any search with "null" and "tomcat" in it returns a lot of
pages about unrelated problems.
 
Thanks,
--Michael Molloy
 
=========================================
Michael Molloy
Senior Software Engineer
Ncycles Software Solutions
901.756.2705

Re: Null printed in jsp getProperty fields

Posted by Tim Funk <fu...@joedog.org>.
There is no setting to turn this off.

[But if you use JSTL - null get supressed for you.]

-Tim

Michael Molloy wrote:

> Hello everyone. I can't imagine that this isn't a question that has been
> asked a great many times, but I can't find the answer anywhere.
>  
> We're using multiple tomcat 4.1.30 servers in a production environment
> for a commercial website, and we would like to move up to the latest
> stable version. However, when testing our application in tomcat 5.0+, we
> have noticed that jsp pages that use the <jsp:getProperty /> method to
> display session data print the word "null" in every field that has a
> null value.
>  
> Although I haven't read about this, I'm guessing it is part of the Sun's
> application server standard. I've been told that WebLogic does the same
> thing, but that there is a configuration setting to repress displaying
> the word null.
>  
> Is there such a setting for tomcat? If not, what is the best way to keep
> from printing "null" in every field that has a null value? I know we
> could do it through javascript, but it just seems like a change this
> big, after years of not having this behaviour, there must be some way to
> prevent it from happening at the application server level.
>  
> Can someone point me in the right direction? I've googled for the
> answer, but any search with "null" and "tomcat" in it returns a lot of
> pages about unrelated problems.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org