tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karanjkar, Sanjay V \(IT\)" <Sanjay.Karanj...@morganstanley.com>
Subject Tomcat 5.0.30 - UTF-8 encoding not working
Date Thu, 02 Jun 2005 13:30:46 GMT
Hi msjava,

I'm trying to migrate our webapp from ServletExec4.1.1/JDK1.3.1 to Tomcat5.0.30/JDK1.4.2.
On ServletExec, our app was showing/saving UTF-8 strings correctly. However, after migration
to Tomcat, the pages are not showing UTF-8 encoded content correctly.

All our JSP pages contain the following:
---------------------------------------
<%@ page import="java.util.*, java.lang.*" contentType="text/html; charset=UTF-8" %>
...
...
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">


The web.xml file contains:
-------------------------
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
....
....

A filter servlet for all JSPs:
-----------------------------
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
{
  try 
  {
    if (null != encoding)
    {
      request.setCharacterEncoding(encoding);
    }
    filterChain.doFilter(request, response); ....
....
....


Do I need to do something else for Tomcat? In particular, do I need to do the stuff mentioned
here: http://wiki.apache.org/jakarta-tomcat/Tomcat/UTF-8

 
Thanks in advance
Sanjay 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality
or privilege, and use is prohibited. 
 

---------------------------------------------------------------------
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