html文件的中文可以显示,但是在表格输入中文保存后就变成?? ?
server.xml 的配置如下:
<?xml version='1.0' encoding='utf-8'?>
port="8443" maxThreads="200" scheme="https"
secure="true" SSLEnabled="true"
clientAuth="false" sslProtocol="TLS"
URIEncoding="UTF-8"
compression="force"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".log"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
web.xml 配置如下:
setCharacterEncodingFilter
org.apache.catalina.filters.SetCharacterEncodingFilter
encoding
UTF-8
ignore
true
true
</filter>
<filter-mapping>
<filter-name>setCharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>