???? 雖然項目全部采用了UTF-8編碼,所有的源文件*.java,*.jsc,*.html,*.ftl都采用了UTF-8編碼。可是還是出現(xiàn)了亂碼問題。很是不爽,后來找到了tomcat,和resin的配置。
- Tomcat的配置。(conf/server.xml)????<!--?Define?a?non-SSL?HTTP/1.1?Connector?on?port?8080?-->
????<Connector?port="80"?maxHttpHeaderSize="8192"
???????????????maxThreads="150"?minSpareThreads="25"?maxSpareThreads="75"
???????????????enableLookups="false"?redirectPort="8443"?acceptCount="100"
???????????????connectionTimeout="20000"?disableUploadTimeout="true"?URIEncoding="UTF-8"/> - Resin的配置。(conf/resin.conf)
character-encoding
Resin 1.1 child of: resin, server, host-default, host, web-app-default, web-app
default: The default value is ISO-8859-1.Specifies the default character encoding for the environment.
<web-app id='/'> <character-encoding>shift_jis</character-encoding> ... </web-app>
???? 這個是resin doc里面的我是在web-app-default里面加上了encoding的配置





希望對你的項目有幫助。
?? 除經(jīng)特別注明外,本文章版權歸莫多泡泡所有.
署名,非商業(yè)用途,保持一致.???somebody(莫多)??