You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by BILODEAU Guillaume SOFRECOM <gu...@sofrecom.com> on 2004/01/21 16:18:25 UTC

Re: Trying to set the output from jsp page into GZIP format ...

Hi everyone,

I have read the following reply (rather old) in the archives:

>In servlet 2.2 environments, you basically won't be able to do this.
But
>in servlet 2.3 environments, you can create a Filter to do the
compression
>for you, on output from either servlets or JSP pages.

This was in response to a question about adding GZip compression to a
JSP in a Struts environment.  I have tried doing a similar thing by
extending the ActionServlet class and wrapping the original response in
a GZip-compressed response, but without any success: I constantly end up
receiving a download dialog on my browser (as if I were sending a zipped
file) or getting ClassCastExceptions (with IBM WebSphere classes being
expected).  I suspect the forward mechanism is the cause to all that.

Can you confirm that it is impossible to add such support for
compression even by extending the ActionServlet?  Would there be any
other mechanism to compress the response sent to the client?  Any
pointers on the web?  I am using the servlet 2.2 API on WebSphere 4.0.3.

Thanks a lot,
Guillaume



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