0

servelt アプリケーションで、Gzip フィルター (/*, REQUEST) を追加し、それをフィルター チェーンの最初に構成しました。Deocorators.xml で指定されているようにリクエストが除外されている場合 (たとえば ajax リクエストの場合) を除いて、Sitemesh のフィルター (/*、REQUEST、FORWARD) で正常に動作し、gzip フィルターは不正な状態をスローします。

gzip フィルターはhttp://jsp.codefetch.com/example/54/CompressionFilter/src/CompressionResponseWrapper.javaから取得されます

4

1 に答える 1

0

I'd rather configure Gzipping at servletcontainer level. Every self-respected servletcontainer supports it. Since it's unclear which one you're using and Tomcat is the most popular/cloned/forked one, here's a Tomcat targeted example so that you at least have a clue where to look in your servletcontainer.

Open /conf/server.xml, locate the <Connector> element and add compression="on" to it.

<Connector (...) compression="on" />

That's it.

于 2010-08-19T17:06:38.563 に答える