[opencms-dev] Cache and compression filters for use with OpenCms

Alex ! kingofkingston at hotmail.com
Wed Feb 25 19:40:01 CET 2004


GZIPFilter (for compressing response to client) works great!
Source code attached. (3 files)

Add this to your web.xml:

	<filter>
		<filter-name>GZIPFilter</filter-name>
		<filter-class>your.packagename.here.GZIPFilter</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>GZIPFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

I have commented out the system.out.println statements for testing/debug 
requests/responses just uncomment to see the output in console.

btw. source code is freely distributable with authors permission (see 
previous link).


>From: "Alexander Kandzior" <alex at opencms.org>
>Reply-To: opencms-dev at opencms.org
>To: <opencms-dev at opencms.org>
>Subject: RE: [opencms-dev] Cache and compression filters for use with 
>OpenCms
>Date: Wed, 25 Feb 2004 10:59:19 +0100
>
>I don't think the FlexCache should be an issue, at least not with version
>5.0.1 (that contains some important internal changes regarding the 
>FlexCache
>over 5.0.0 thay _may_ be required).
>
>If the OpenCms servlet gets a "normal" request after the filters did 
>process
>it, then it should work. The FlexCache only operates internal to OpenCms,
>not "outside" or "before" the servlet.
>
>I would give it a try.
>
>Best Regards,
>Alex.
>
>Alexander Kandzior
>Alkacon Software - The OpenCms Experts
>http://www.alkacon.com
>
> > -----Original Message-----
> > From: opencms-dev-admin at opencms.org
> > [mailto:opencms-dev-admin at opencms.org] On Behalf Of Alex !
> > Sent: Wednesday, February 25, 2004 1:56 AM
> > To: opencms-dev at opencms.org
> > Subject: [opencms-dev] Cache and compression filters for use
> > with OpenCms
> >
> >
> > I was reading about compression and caching filters over at :
> >
>http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html
>
>I know the compression filter will be ok to use, as it compresses the
>response according to the browser being able to accept gzip'd content.
>
>However, would it be feasible to use a compression filter "in front" of the
>opencms servlet? I'm not quite sure how the flex cache works, so would this
>be worth doing, or possible?
>
>Any ideas?
>
>
>Alex
>
>_________________________________________________________________
>It's fast, it's easy and it's free. Get MSN Messenger today!
>http://www.msn.co.uk/messenger
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev

_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection 
http://www.msn.co.uk/specials/btbroadband
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GZIPFilter.java
Type: application/octet-stream
Size: 1008 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040225/aa073eff/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GZIPResponseStream.java
Type: application/octet-stream
Size: 4418 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040225/aa073eff/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GZIPResponseWrapper.java
Type: application/octet-stream
Size: 1641 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040225/aa073eff/attachment-0002.obj>


More information about the opencms-dev mailing list