tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Configuring Tomcat 5 to not display null value as word null
Date Sat, 21 Aug 2004 12:29:35 GMT
Use JSTL.
<c:out value="${param.no_such_thing}"/>
<c:out value="${request.no_such_thing}"/>

-Tim

Rick Wong wrote:

> Hi,
> 
> I have the following JSP fragment:
> 
> ....
> case 1 = <%=request.getParameter("no_such_thing")%>
> case 2 = ${requestScope["no_such_thing"]}
> ....
> 
> The output of the page is
> 
> ...
> case 1 = null
> case 2 =
> ...
> 
> Is there any way that Tomcat can be configured to not display the word 
> "null" if the value is null?  It is easy to replace the above example in 
> case 1 by case 2, but in my case it is not easy to make such change to 
> my existing code base (which I am migrating from another servlet engine 
> that outputs null as "").  I have pages with the <input type=text> 
> elements displaying the string "null" when there is no default value.
>  

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


Mime
View raw message