Maybe he could check that in the jsp as well. Then maybe it's a little simpler to do. say (roughly) : ..... if (request.getParameter("blah")==null) { ....print something meaningful instead.
On Fri, 20 Aug 2004 18:15:48 -0700, Justin Ruthenbeck <[EMAIL PROTECTED]> wrote: > > There is no Tomcat magic configuration parameter to make this > happen. Instead, take a look at HttpServletRequestWrapper. You can > combine that with a Filter to override the behavior of getParameter() for > the pages that need it such that it returns "" instead of "null" when no > such parameter value exists. > > If you're unfamiliar with the above concepts, check Google, so see: > http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p4.html > > Good luck, > justin > > At 04:54 PM 8/20/2004, you 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. > > > >Thanks, > >-- > >Rick > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > ______________________________________________ > Justin Ruthenbeck > Lead Software Engineer, NextEngine Inc. > justinr - AT - nextengine DOT com > Confidential. See: > http://www.nextengine.com/confidentiality.php > ______________________________________________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]