1. 程式人生 > >tomcat打開gzip、配置utf-8

tomcat打開gzip、配置utf-8

pla json connect script ont via protocol http size

在部署描述文件中配置如下內容:(web.xml)

打開gzip

  compression="on"
配置utf-8

  URIEncoding="UTF-8"

            <Connector port="80" protocol="HTTP/1.1"
                       connectionTimeout="20000"
                       redirectPort="8443"
                URIEncoding="UTF-8"
                compression="on"
                compressionMinSize="2048"
                noCompressionUserAgents="gozilla,traviata"
                compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain,application/json"

  

tomcat打開gzip、配置utf-8