开发者

Enable GlassFish Compression

How to enable glass fish compression?开发者_如何学Python I enabled compression in http-lister properties but no changed response


  • Login to admin console: localhost:4848
  • Go to the Network Config > Network Listener
  • Select the listener for which you want to enable gzip > HTTP Tab


  1. Check if you have min compression size set. I don't remember from the top of my head if glassfish has a default min compression size. Pretty much if the resource does not exceed this value in size, it won't be compressed.
  2. Check if you have correct compressableMimeType set. application/xml is not the same as text/xml, even if they're really both XMLs.


Responses to HTTP requests in version 1.0 are not compressed. You must send your requests in HTTP 1.1 to get gzipped responses from your glassfish server.

More over, you must add the header "Accept-Encoding: gzip" in your http requests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜