You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sky yjck <sk...@hotmail.com> on 2004/11/10 10:09:36 UTC

Why the javaEncoding setting is noneffective?

I hope tomcat parse the jsp file with the GBK encoding,so I set the 
javaEncoding paramater's value to "GBK".

The simple JSP file is:

<html>
<body>
output: Something String
</body>
</html>

My operation system is chinese GBK charset. When I replace "Something 
String" to chinese text,I found the parsed java source file by tomcat have 
some "???" char.

I add charset setting to the jsp file:

<%@ page language="java" contentType="text/html;charset=GBK" %>
<html>
<body>
output: Something String
</body>
</html>

And the parsed java source file is correct!It can display the right chinese 
text.

I thought the javaEncoding parameter value is used when parse a jsp file to 
java source file,and jsp file's charset setting is used when response to 
the client.But it seems not work well.

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org