tomcat打开gzip、配置utf-8

在部署描述文件中配置如下内容:(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"

  

posted @ 2017-11-19 12:55  rslai  阅读(349)  评论(0编辑  收藏  举报