tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taavi Tiirik" <>
Subject RE: charset problem
Date Wed, 29 Aug 2001 10:05:46 GMT
> -----Original Message-----
> From: Giannis []
> Sent: 27-08-2001 1:46 PM
> To:
> Subject: charset problem
> I make some JSP pages on Jacarta tomcat.
> I have problem with the character set.
> I use content type ISO-8859-7 but the server doesnt appear the
> (it appear ?????????) even if  I use a META tag or a
> page directive for the contentType.
> The problem is especially on request.getParameter when I submit a
> Please help

If you are you using Tomcat4.0 then I can suggest a solution that works
for me.

In the beginning of .jsp file I had following:
<%@ page contentType="text/html; charset=iso-8859-15"
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


  <meta http-equiv="Content-Type" content="text/html;

and Tomcat still sent this with page encoding set to iso-8859-1.

With the help of
you can serve pages with correct encoding. Configuration example is
in webapps/examples/WEB-INF/web.xml and it goes like this:

<!-- Example filter to set character encoding on each request -->
  <filter-name>Set Character Encoding</filter-name>
    <!-- put your encoding here -->

To use this filter you have to set up filter mapping:

  <filter-name>Set Character Encoding</filter-name>

Just make sure you have filter.SetCharacterEncodingFilter in your
classpath or you can copy SetCharacterEncodingFilter.class into
<your_webapp>/WEB-INF/classes/filter directory.

Hope this works for you too.

with best wishes,

View raw message