Bart Guijt wrote:
>
> Hi all,
>
> I'm interested to see whether the following technique is useful for Cocoon apps as
>well: compressing requested content if the client supports it. The article at the
>following
> link illustrates this best:
>
>
> http://www.servletsuite.com/servlets/compress.htm
>
>
> I browsed the Cocoon sources to see whether something like this was already
>implemented, but apparantly it's not.
>
> Has anybody used this before? What are your experiences?
>
>
> Ciao,
>
> Bart Guijt
Put this lines into your web.xml:
<filter>
<filter-name>Compression Filter</filter-name>
<filter-class>compressionFilters.CompressionFilter</filter-class>
<init-param>
<param-name>compressionThreshold</param-name>
<param-value>10</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Compression Filter</filter-name>
<url-pattern>*.gnumeric</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Compression Filter</filter-name>
<url-pattern>*.gz</url-pattern>
</filter-mapping>
If you use tomcat, put webapps/examples/WEB-INF/classes/compressionFilters
into WEB-INF/classes
That's all.
It is submitted to bugzilla as a patch to web.xml.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]