You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Baker <jb...@javasystemsolutions.com> on 2011/04/01 13:47:11 UTC

Tomcat GzipOutputFilter

Hello,

I note there's a GzipOutputFilter in the Tomcat (and JBoss) jar files:

http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/http11/filters/GzipOutputFilter.html

Yet I can't load it in the web.xml file using <filter-class>. Is there
some pre-defined filter name for this filter?


John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat GzipOutputFilter

Posted by Pid <pi...@pidster.com>.
On 01/04/2011 13:31, John Baker wrote:
> The AJP connector doesn't support compression (a missing useful feature
> in my opinion) so I found myself looking for a filter. Thanks for
> letting me know it won't work. I'll look at the example filter.

Surely you want to be doing that at the HTTPD edge?
mod_deflate would do the job and requires minimal configuration.


p

> On Fri, 01 Apr 2011 16:28 +0400, "Konstantin Kolinko"
> <kn...@gmail.com> wrote:
>> 2011/4/1 John Baker <jb...@javasystemsolutions.com>:
>>> Hello,
>>>
>>> I note there's a GzipOutputFilter in the Tomcat (and JBoss) jar files:
>>>
>>> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/http11/filters/GzipOutputFilter.html
>>>
>>> Yet I can't load it in the web.xml file using <filter-class>. Is there
>>> some pre-defined filter name for this filter?
>>
>> This class does not implement the javax.servlet.Filter interface and
>> thus it cannot be used in a web application.
>>
>> It is just an internal component of HTTP connectors, that is used when
>> you enable gzip compression on the connector,
>> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
>>
>> There is "compressionFilters.CompressionFilter" class in the examples
>> webapp though, that can be used as a Filter.
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



Re: Tomcat GzipOutputFilter

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
 On Fri, 01 Apr 2011 13:31:18 +0100, "John Baker" 
 <jb...@javasystemsolutions.com> wrote:
> The AJP connector doesn't support compression (a missing useful 
> feature
> in my opinion)

 Typical deployment setup for AJP connector is to pass requests via 
 processes on the same machine, or at least in the same network segment. 
 So there's no need to compress such traffic.
 You want compression to limit bytes sent to remote clients, over WAN 
 connection.

-- 
 Mikolaj Rydzewski <mi...@ceti.pl>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat GzipOutputFilter

Posted by John Baker <jb...@javasystemsolutions.com>.
The AJP connector doesn't support compression (a missing useful feature
in my opinion) so I found myself looking for a filter. Thanks for
letting me know it won't work. I'll look at the example filter.

On Fri, 01 Apr 2011 16:28 +0400, "Konstantin Kolinko"
<kn...@gmail.com> wrote:
> 2011/4/1 John Baker <jb...@javasystemsolutions.com>:
> > Hello,
> >
> > I note there's a GzipOutputFilter in the Tomcat (and JBoss) jar files:
> >
> > http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/http11/filters/GzipOutputFilter.html
> >
> > Yet I can't load it in the web.xml file using <filter-class>. Is there
> > some pre-defined filter name for this filter?
> 
> This class does not implement the javax.servlet.Filter interface and
> thus it cannot be used in a web application.
> 
> It is just an internal component of HTTP connectors, that is used when
> you enable gzip compression on the connector,
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> 
> There is "compressionFilters.CompressionFilter" class in the examples
> webapp though, that can be used as a Filter.
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat GzipOutputFilter

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/1 John Baker <jb...@javasystemsolutions.com>:
> Hello,
>
> I note there's a GzipOutputFilter in the Tomcat (and JBoss) jar files:
>
> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/http11/filters/GzipOutputFilter.html
>
> Yet I can't load it in the web.xml file using <filter-class>. Is there
> some pre-defined filter name for this filter?

This class does not implement the javax.servlet.Filter interface and
thus it cannot be used in a web application.

It is just an internal component of HTTP connectors, that is used when
you enable gzip compression on the connector,
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

There is "compressionFilters.CompressionFilter" class in the examples
webapp though, that can be used as a Filter.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org