Web 无法在tomcat服务器中将内容编码设置为gzip

Web 无法在tomcat服务器中将内容编码设置为gzip,web,tomcat6,content-encoding,Web,Tomcat6,Content Encoding,我对网页中的响应标题有问题,…我的server.xml有以下详细信息,但没有在“响应标题中获取“内容编码”” 我只是想确定一下 1] .仅在server.xml中更改就足够了吗 2] 。我是否也必须在web.xml中进行任何更改 <Connector compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript" com

我对网页中的响应标题有问题,…我的server.xml有以下详细信息,但没有在“响应标题中获取“内容编码”


我只是想确定一下

1] .仅在server.xml中更改就足够了吗

2] 。我是否也必须在web.xml中进行任何更改

<Connector compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript"
compression="on"
compressionMinSize="128"
connectionTimeout="20000"
noCompressionUserAgents="gozilla, traviata"
port="8080"
redirectPort="8443" protocol="HTTP/1.1" />