Essentially, the "compressionThreshold" filter init param is a buffer size for
CompressionResponseStream. If it's 0, then compression is turned off (this is
handled by the filter, not the stream). Otherwise, it's the max of 128
(hard-coded min) and whatever is set in web.xml. The stream works by buffering
up bytes and periodically flushing them to a GZIPOutputStream that wraps the
response's ouput stream.

Quoting Jerry Jalenak <[EMAIL PROTECTED]>:

> I've also been playing around with this with mixed results.  I've been
> looking for some doc on the filter mainly to better understand the
> 'compressThreshold' setting.  Does anyone have any doc for this thing?
> 
> Jerry Jalenak
> Development Manager, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
> 
> [EMAIL PROTECTED]
> 
> 
> > -----Original Message-----
> > From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, February 25, 2004 6:13 AM
> > To: Struts User Jakarta
> > Subject: Tomcat 4 Compression Filter
> > 
> > 
> > There is a CompressionFilter class shipped with with Tomcat 
> > which compresses the ServletResponse that I'm considering 
> > using (we have some remote offices which have slow links):
> > 
> > http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/webapps/e
> > xamples/WEB-INF/classes/compressionFilters/CompressionFilter.j
> > ava?rev=1.8&view=auto
> > 
> > It looks OK to me and seems to work fine when I plug it into my app.
> > 
> > I'm a bit concerned that its only an "example" class rather 
> > than standard feature of Tomcat. 
> > 
> > Has anyone used this in a 'live' environment and if so are 
> > there any issues or with it or recommendations?
> > 
> > Does anyone have any alternatives that they have deployed?
> > 
> > Niall

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to