tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wall <>
Subject Re: Tomcat 7.0.19 character encoding issue with JSP
Date Thu, 01 Sep 2011 19:00:55 GMT
You are right about the encoding of the .java file in Eclipse.  I tried 
in 'vi' and sure enough the codes are in there correctly.  Interesting 
that Eclipse opened the .jsp file and showed it nicely, but the .java 
file was not.  I couldn't do the properties, though, since these files 
are not part of my project, but I was able to drag them into Eclipse.

Anyway, I was still having the problem, but noted that my URL actually 
runs a servlet that does a RequestDispatcher.include() of my generated 
JSP page, so even though the JSP says everything was UTF-8 in the @page 
directive, apparently the response was already set to the default 
charset in the servlet itself.  So I added 
response.setCharacterEncoding("UTF-8"); to the top of my servlet's 
doGet/doPost and that seems to have resolved it.

Thanks for all the tips and ideas!


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

View raw message