tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Old fasion question - Encoding!
Date Wed, 03 Sep 2003 14:46:40 GMT
Okey guys!

I have problems with Tomcat 4.1.x (27)

I am using struts 1.1 tiles and Co. to make my app. The first and pretty 
big problem is with encoding.
I have one of tiles which reads menu names from property file which 
contains texts with special chars. They are correct
and that's prooved.

Now what happens!

When the file is rendered I get "?" instead of special chars even if I 
have set <%@page pageEncoding="windows-1257"%>
That DOES NOT happen if I switch to Tomcat 4.0.6 which displays the 
characters correctly with the same (unchanged) JSP pages.
So I assume that soemthing has broken between 4.0.6 and 4.1.27! I have no 
knowledge and experience to find the differences!

Also the question about dynamic change of the  encoding.
Regarding JSP spec you can set encoding directly into response in case if 
response is not commited and "fresh"!
If I do the very first line 
<%response.setContentType("text/html;charset=windows-1257");%> then I get 
"?" in both servers
4.0.6 and 4.1.27 but looking into JSP page code I see that only difference 
in setting encoding into response is that in case
of <@page> the response.setContnetType is called before optaining 
pageContext, out, session etc... so where is
that small catch?

And I know that "encoding" is on BIG problem in Tomcat  :(

Tomcat 4.1.27 has this "?" sign problem even if you specify <%@page%> 
directive in main page and then included and "struts-tiled" files are
Living things are systems that tend to respond to changes in their 
and inside themselves, in such a way as to promote their own continuation.

Janis Olekss
Exigen Latvia System Analyst
(Office) +371 7072900
(Cell) +371 9136267
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message