Although I haven't done this I think technically this is analogous to
post-processing JSP-generated XML through an XSL engine so I'll hazard that
similar techniques can be applied.

1. servlet chain
Write a servlet that simply GZips the output stream.
Set a custom mime-type in your JSPs.
Configure your servlet container to redirect all such MIME types to the
GZipper servlet.
If *ALL* text/html (from JSPs or static files whatever...) is to be GZipped
then you don't need to bother with a custom MIME type.

Be warned - this solution tends to be vendor-specific according to your
servlet container.

2. taglib
Write a custom tag action and enclose your JSPs in the custom tag.
This is a bit more complex but should be handled consistently by any
container that supports the
appropiate version of the spec.
The example of how to do this for XSL has been previously discussed here and
you can get from the archive.

Regards
@

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to