希望在Weblogic中启用GZip压缩 [英] Want to enable GZip compression in Weblogic

查看:894
本文介绍了希望在Weblogic中启用GZip压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的静态文件启用GZIP压缩,如css样式,从weblogic服务器提供的javascript。任何人都可以帮助如何在weblogic服务器中配置此功能。

I want to enable GZIP compression for my static file like css styles, javascript which is serving from weblogic server. Can anyone help to how to configure this feature in weblogic server.

推荐答案

转到 http://sourceforge.net/projects/pjl-comp-filter/ 下载并更新您的 web.xml 文件具有以下配置:

Go to http://sourceforge.net/projects/pjl-comp-filter/ to download it and update your web.xml file with the following config:

<filter>
    <filter-name>CompressingFilter</filter-name>
    <filter-class>com.planetj.servlet.filter.compression.CompressingFilter</filter-class>
    <init-param><param-name>includeContentTypes</param-name><param-value>text/html,text/css,application/x-javascript</param-value></init-param>
    <init-param><param-name>compressionThreshold</param-name><param-value>256</param-value></init-param>
</filter>

<filter-mapping>
    <filter-name>CompressingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

这篇关于希望在Weblogic中启用GZip压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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