Question:

I think to try to speed up my Web App by reducing the size of transferred data. For example, in Nginx there is a special module. How to enable compression for JBoss server?

Answer:

JBoss AS version 6 or lower

To enable gzip compression, settings need to be added to your existing HTTP connector. 
Located at /server/default/deploy/jbossweb.sar/server.xml:

<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector protocol="HTTP/1.1" port="${jboss.web.http.port}"
address="${jboss.bind.address}" redirectPort="${jboss.web.https.port}" compression="force"
compressionMinSize="512"
noCompressionUserAgents=""
compressableMimeType="text/html,text/xml,text/css,text/javascript"
/>

JBoss AS 7.0.x

JBoss 7.0.x - 7.1.0 have no support for gzip compression build in
See also issue report at: https://issues.jboss.org/browse/AS7-2991

One way to add gzip compression in JBoss 7.0 is to add is as filter. 
For details: https://code.google.com/p/webutilities/wiki/CompressionFilter

JBoss AS 7.1.1

Just recently JBoss finished adding gzip compression to JBoss. As of version 7.1.1Final, gzip compression is supported out of the box again. To enable, add to the server launch params:

-Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on

referene from:http://stackoverflow.com/questions/12590521/how-to-configure-gzip-for-jboss

How to configure Gzip for JBoss?---refer的更多相关文章

  1. configure JAAS for jboss 7.1 and mysql--reference

    Hello all, In this tutorial we are going to configure JAAS for jboss 7.1 and mysql for Form based au ...

  2. How Classes are Found

    转载自: https://docs.oracle.com/javase/7/docs/technotes/tools/findingclasses.html How Classes are Found ...

  3. Linux 上安装 Couchbase服务

    down: http://www.couchbase.com/downloads/ doc:  http://docs.couchbase.com/archive-index/ forums: htt ...

  4. 自学Python十一 Python爬虫总结

    通过几天的学习与尝试逐渐对python爬虫有了一些小小的心得,我们渐渐发现他们有很多共性,总是要去获取一系列的链接,读取网页代码,获取所需内容然后重复上面的工作,当自己运用的越来越熟练之后我们就会尝试 ...

  5. 自学Python九 爬虫实战二(美图福利)

    作为一个新世纪有思想有文化有道德时刻准备着的屌丝男青年,在现在这样一个社会中,心疼我大慢播抵制大百度的前提下,没事儿上上网逛逛YY看看斗鱼翻翻美女图片那是必不可少的,可是美图虽多翻页费劲!今天我们就搞 ...

  6. 国产深度学习框架mindspore-1.3.0 gpu版本无法进行源码编译

    官网地址: https://www.mindspore.cn/install 所有依赖环境 进行sudo make install 安装,最终报错: 错误记录信息: cat     /tmp/mind ...

  7. How to Configure Tomcat/JBoss and Apache HTTPD for Load Balancing and Failover

    http://java.dzone.com/articles/how-configure-tomcatjboss-and In this post we will see how to setup a ...

  8. Enable Access Logs in JBoss 7 and tomcat--转

    JBoss 7 is slightly different than earlier version JBoss 5 or 6. The procedure to enable access logs ...

  9. Class loading in JBoss AS 7--官方文档

    Class loading in AS7 is considerably different to previous versions of JBoss AS. Class loading is ba ...

随机推荐

  1. UIToolbar+UIWebView 浏览器

    创建界面 var webView : UIWebView! var toolBar : UIToolbar! let swiftWH = UIScreen.mainScreen().bounds.si ...

  2. 开始学习<p>标签,添加段落

    如果想在网页上显示文章,这时就需要<p>标签了,把文章的段落放到<p>标签中. 语法: <p>段落文本</p> 注意一段文字一个<p>标签, ...

  3. Java学习----反复做某件事情

    for循环: public class TestFor{ public static void main(String[] args){ for(int x = 1; x < 3; x++) { ...

  4. memcache锁

    锁的使用,一般情况是针对并发或者我们希望程序(crontab的job)串行处理,我们加锁的办法有很多,像文件锁,数据库锁,或者memcache锁,这里关注一下memcache锁,针对memcache锁 ...

  5. C语言基础学习基本数据类型-Char类型

    char类型 char类型用于储存字母和标点之类的字符.但是在技术实现上char却是整数类型.为了处理字符,计算机使用一种数字编码,用特定的整数表示特定的字符.字符变量输入输出用%c符号.定义语法如下 ...

  6. 工具函数之JS

    1. 判断元素是否有滚动条 /* 检测元素是否出现滚动条 @param [object HTMLElement] elm The HTMLElement object @return [Object] ...

  7. 周赛A题

    A  Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu   Description By d ...

  8. sql server 调优----索引未使用

    SELECT TOP 1000o.name AS 表名, i.name AS 索引名, i.index_id AS 索引id, dm_ius.user_seeks AS 搜索次数, dm_ius.us ...

  9. bzoj1188: [HNOI2007]分裂游戏

    Description 聪聪和睿睿最近迷上了一款叫做分裂的游戏. 该游戏的规则试: 共有 n 个瓶子, 标号为 0,1,2.....n-1, 第 i 个瓶子中装有 p[i]颗巧克力豆,两个人轮流取豆子 ...

  10. JS之路——日期函数

    时间对象是一个我们经常要用到的对象,无论是做时间输出.时间判断等操作时都与这个对象离不开.除开JavaScript中的时间对象外,在VbScript中也有许多的时间对象,而且非常好用.下面还是按照我们 ...