tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject character encoding issue
Date Sun, 14 Dec 2003 15:11:29 GMT
This is something I thought I had sorted out but somehow it popped its 
ugly head up again today.

I have tomcat 5.0.16 and I'm setting the character encoding for my JSPs 
in the web.xml with the new config mechanism:

       <description>All JSPs</description>

That handles the response and I fix the request by setting all request 
character encoding in a filter.

I have this simple JSP scriptlet:

   String role = request.getParameter("role");
   if (role == null)
     role = "";
   if (role.length() > 0) {
     if (request.isUserInRole(role)) {
       You have been granted role <strong><%= role %></strong><br /><br

But the JSP destroys my German characters like ä, ö & ü.

I put debug output in the JSP with the following:


It shows UTF-8 for both.

This does however setup work for my servlets, which successfully input & 
output the German characters between the browser and the database.

What am I doing wrong anybody?

struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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

View raw message