You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dmitry Ivanov <DI...@MAGROUP.RU> on 2002/05/06 15:57:19 UTC
[PATCH]: Improved internationalization support
Hello,
There is a little patch fixes JSP & Filter
responce object internationalization support.
This code doesn't work when filter mapped on *.jsp:
==============================================================
/**
* Localization filter
*/
public class LocalizationFilter implements Filter
{
.....
public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse,
FilterChain filterChain)
throws IOException, ServletException
{
String mimeEncoding = /* get mime encoding from */;
.....
// This call does not work without patch.
servletResponse.setContentType("text/html; charset=" + mimeEncoding);
.....
filterChain.doFilter(servletRequest, servletResponse);
}
}
==============================================================
I tested it under Tomcat 4.0.3
See fix in attachment.
Regards,
Dmitry Ivanov.