使用GZIP配置Tomcat 8 [英] Configurate Tomcat 8 with GZIP

查看:150
本文介绍了使用GZIP配置Tomcat 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Tomcat中设置GZIP,我已经展示了很多示例,但是任何人都可以为我工作。在下面,您可以看到我的server.xml配置和请求示例:

I'm trying to set GZIP in Tomcat, I've shown a lot of examples but anyone works for me. Below you can see my server.xml configuration and an example of request:

server.xml

server.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               useSendfile="false"
               compression="force" compressionMinSize="1024" noCompressionUserAgents="gozilla, traviata"
       compressableMimeType="text/html,text/xml,text/javascript,text/css,application/javascript"/>

请求:

谢谢!

推荐答案

我找到了答案,我禁用了防病毒软件,并且压缩正常。

I've found the answer, I've disabled my antivirus and compression works fine.

这篇关于使用GZIP配置Tomcat 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆