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

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

问题描述:

对于这个通过管理控制台解决它的问题,有一个varietyanswers。我想通过Glassfish的XML配置启用此功能,但没有找到任何有关此功能的文档。通过XML配置在Glassfish中启用gzip压缩

你可以将它设置在domain.xmlnetwork-config - >protocols

例子:

<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>