tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject [taglib] JSTL & character encoding
Date Sun, 28 Sep 2003 15:54:36 GMT
I'm trying to set my pages to UTF-8. I am setting my page directive with:

<% page contentType="text/html; charset=UTF-8" %>

and so long as I don't use the JSTL fmt taglibs, it works. When I put in 
something like <fmt:message key="general.browserTitle" /> then UTF-8 is 
overridden and response content type is set to ISO-8859-1.

On digging around I can't really see obviously in the source when the 
response.setContentType is called, but I can see that the sessions are 
getting this attribute set:


although it doesn't seem to be the cause, just another symptom. I have 
tried <fmt:requestEncoding value="UTF-8" /> with no success.

I am using a filter in tomcat to set the request encoding anyway, and 
this is always UTF-8.

I'd appreciate any help on this, I've must have spent about 6 hours 
trying to nail this glitch.


struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9

View raw message