*目次 [#n2d314d7]
#contents

*接続フィルタのコンフィグレーション [#l94f8a8a]

http://otndnld.oracle.co.jp/document/products/wls/docs81/secmanage/domain.html


*ログ メッセージのフィルタ処理 [#v9d42e51]

http://docs.oracle.com/cd/E16764_01/web.1111/b55548/filtering.htm


*Java Servletフィルタ実装手順 [#s33da594]
http://www.syboos.jp/java/doc/servlet-filter-implement.html

*レスポンスを圧縮する [#o7d1f8a7]
http://japan.internet.com/developer/20091020/26.html

**メリット [#pd45b219]
一般に、サーバレスポンスに大量のテキスト出力あるいはバイナリ出力が含まれる場合は、圧縮してからネットワークに送出した方がパフォーマンス向上につながります。


**デメリット [#z2e3648c]
データ量が少ないレスポンスの場合は、圧縮のメリットはあまり期待できません。サーバ側とクライアント側の双方で展開処理を行うため、そのぶんだけパフォーマンスが低下するからです。同様に、長距離間の通信ではない場合も、圧縮をすべきかどうかは慎重に検討した方がよいでしょう。展開処理の負荷によって圧縮のメリットがほとんど相殺されてしまうケースも考えられるからです。


*PlanetJフィルタ [#gf77cd07]

**説明 [#w2a91be2]
http://www.thetechie.org/enabling-gzip-compression-with-servlet-filter/

**ダウンロード [#ud036fad]
http://sourceforge.net/projects/pjl-comp-filter/

***pom.xml [#k2bf14bb]
 <dependency>
    <groupId>net.sourceforge.pjl-comp-filter</groupId>
    <artifactId>pjl-comp-filter</artifactId>
    <version>1.7</version>
 </dependency>

***設定例1 [#jfed5c7e]
 <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/plain</param-value>
    </init-param>
    <init-param>
        <param-name>compressionThreshold</param-name>
        <param-value>0</param-value>
    </init-param>
 </filter>
 <filter-mapping>
    <filter-name>CompressingFilter</filter-name>
    <url-pattern>/*</url-pattern>
 </filter-mapping>


***設定例2 [#c14809bd]
 <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>


*Tomcatの圧縮について [#zc291d52]

なにか参考になるかもしれないとおもうので、Tomcatの圧縮設定についてメモしておく

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


**compression [#ocd9b636]

The Connector may use HTTP/1.1 GZIP compression in an attempt to save server bandwidth. The acceptable values for the parameter is "off" (disable compression), "on" (allow compression, which causes text data to be compressed), "force" (forces compression in all cases), or a numerical integer value (which is equivalent to "on", but specifies the minimum amount of data before the output is compressed). If the content-length is not known and compression is set to "on" or more aggressive, the output will also be compressed. If not specified, this attribute is set to "off".
トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS