tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <>
Subject RequestDispatcher and pageEncoding question...
Date Thu, 15 Apr 2004 20:02:28 GMT

A servlet I am debugging and trying to understand sets the response's 
contentType as follows:

response.setContentType( "text/html;charset=UTF-8" );

Shortly following the following forward is done:

request.getRequestDispatcher( jspPage ).forward( request, response );

The JSP forwarded gets the response with the contentType set, but 
commiting the response seems to reset the contentType to 
text/html;charset=ISO-8859-1, the default.

The JSP in the forward does not set a pageEncoding attribute in the page 
directive, so I'm pointing the finger there at the moment. Can someone 
outline what is going on behind the scenes of the requestDispatcher call 
that would be reseting the response's contentType?

Many thanks in advance,

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

View raw message