You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Kai Kousa <ka...@jadecon.fi> on 2008/07/14 09:00:37 UTC
How to GZIP output from Tiles 2?
Hi!
I tried to write my own GZIPFilter that would do the trick of
compressing HTML outputted from Tiles but I get the following exception
when I try to get the OutputStream from HttpServletResponse for GZipping:
java.lang.IllegalStateException: getWriter() has already been called for
this response
Is there any way enable compression in Tiles? Or some other solution(s)
to circumvent this problem?
Re: How to GZIP output from Tiles 2?
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/14 Kai Kousa <ka...@jadecon.fi>:
> I tried to write my own GZIPFilter that would do the trick of compressing
> HTML outputted from Tiles but I get the following exception when I try to
> get the OutputStream from HttpServletResponse for GZipping:
>
> java.lang.IllegalStateException: getWriter() has already been called for
> this response
This is normal, every webapp writes in the output stream! It's not
dependent on Tiles.
> Is there any way enable compression in Tiles? Or some other solution(s) to
> circumvent this problem?
You usually have to configure your application server. For example in Tomcat:
https://javatools.dev.java.net/newsletter/2007/20070418.html#tools_tips
Antonio