tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject HttpServletResponse question...
Date Thu, 12 Sep 2002 06:38:32 GMT

I am trying out an XSLT filter in one of the JDCTechTips:

The setContentType() is overridden in the response wrapper.  The way they 
have it set up, though, seems to assume that this method will get called 
automatically since there is no place in the filter that they specifically 
call wrapper.setContentType().  The thing is, setContentType() never gets 
called automatically in Tomcat-4.1.10.

Is the creator of this filter just making an incorrect assumption or is 
Tomcat being buggy by not automatically calling setContentType() on the 
wrapper when filterChain.doFilter(request, wrappedHResponse); is called?

The only way I can make this filter work is if I specifically call 
wrappedHResponse.setContentType("text/xml"); before 
filterChain.doFilter(request, wrappedHResponse);.  Should I have to do 
this?  If so, why didn't the original author do it?  If Tomcat is doing the 
right thing, then the developer who created this example must never have 
tested it because it won't work until that call is specifically made.

Can anyone tell me who is right here?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message