On Fri, 21 Dec 2001, Donie Kelly wrote:

> Date: Fri, 21 Dec 2001 15:16:34 -0000
> From: Donie Kelly <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: How to write a filter in Tomcat 4
>
> Hi all
>
> Can anybody give me a template for a filer which reads and writes to/from
> the servlet being filtered.
>
> I'm having a problem where reads are being blocked. Must be something to do
> with content length, I'm not sure.
>

There's a Filter example included with the Tomcat 4 distribution that
might give you some hints - it does on-the-fly GZIP compression if your
browser tells the server that it supports this, and passes the request on
unmodified otherwise.

Source code is in the "webapps/examples/WEB-INF/classes/compressionFilters"
directory in the Tomcat binary distribution.  It's not enabled by default,
but you can uncomment the appropriate stuff in web.xml to play with it.

> Basically, it's the last day before Christmas and it doesn't work so if
> somebody has some working filter example It'd make my Christmas and allow me
> to get outta here tonight....
>
> Thanks very much
> Donie
>

Craig


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to