通过XML配置在Glassfish中启用gzip压缩

通过XML配置在Glassfish中启用gzip压缩,glassfish,compression,gzip,http-compression,Glassfish,Compression,Gzip,Http Compression,对于这个问题,有很多方法可以通过管理控制台解决。我想通过Glassfish的XML配置启用此功能,但尚未找到任何有关此功能的文档。您可以在网络配置下的域.XML中设置它 例如: <protocol name="http-listener-1"> <http default-virtual-server="server" max-connections="250" compressable-mime-type="text/html,text/xml,text/pla

对于这个问题,有很多方法可以通过管理控制台解决。我想通过Glassfish的XML配置启用此功能,但尚未找到任何有关此功能的文档。

您可以在
网络配置下的
域.XML
中设置它

例如:

<protocol name="http-listener-1">
  <http default-virtual-server="server" max-connections="250" 
    compressable-mime-type="text/html,text/xml,text/plain,text/javascript" compression="on" compression-min-size-bytes="4096">
  <file-cache></file-cache>
  </http>
</protocol>