struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Tomcat 4 Compression Filter
Date Wed, 25 Feb 2004 17:21:00 GMT
It should probably also be mentioned that the JSP buffer can play a role in how
this thing works. The page implementation will generally have a buffer of its
own, the default size for JSP 1.2 is at least 8KB (it can be changed with the
page directive). If the page implementation writes a buffer whose content
length is greater than the compression stream's buffer size, then the page's
buffer will be written directly to the GZIP stream.

Quoting Niall Pemberton <niall.pemberton@blueyonder.co.uk>:

> If you set it less than 10, it will get re-set to 128 (unless its zero)
> 
> ----- Original Message ----- 
> From: "Jerry Jalenak" <Jerry.Jalenak@LABONE.com>
> To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> Sent: Wednesday, February 25, 2004 3:57 PM
> Subject: RE: Tomcat 4 Compression Filter
> 
> 
> > Kris - Thanks.  So what's a reasonable setting?  The example has the
> > threshold set to 10; is this OK for most web apps?
> >
> >
> >
> > Jerry Jalenak
> > Development Manager, Web Publishing
> > LabOne, Inc.
> > 10101 Renner Blvd.
> > Lenexa, KS  66219
> > (913) 577-1496
> >
> > jerry.jalenak@labone.com
> >
> >
> > > -----Original Message-----
> > > From: Kris Schneider [mailto:kris@dotech.com]
> > > Sent: Wednesday, February 25, 2004 9:42 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: Tomcat 4 Compression Filter
> > >
> > >
> > > 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 <Jerry.Jalenak@LABONE.com>:
> > >
> > > > 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
> > > >
> > > > jerry.jalenak@labone.com
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
> > > > > 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:kris@dotech.com>
> > > D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message