RE: GZipping JSF Response

2009-04-17 Thread Madhav Bhargava
> -Original Message-
> From: Simon Kitching [mailto:skitch...@apache.org]
> Sent: Friday, April 17, 2009 7:50 PM
> To: MyFaces Discussion
> Subject: Re: GZipping JSF Response
> 
> Madhav Bhargava schrieb:
> > Hi Cagatay,
> >
> >
> >
> > I tried using the GZipFilter that comes along with ehcache as well. I
> > configured the filter in web.xml and the mapping URL was just
> “*.jsf”.
> > It used to give the same problem. Somehow the gzipped content is
> getting
> > written to the IDE console instead of sending that to the browser.
> 
> It's probably just a filter order problem.
> 
> A servlet engine nests filters in the order they are declared in the
> web.xml file. So make sure your gzip filter is the first filter
> declared
> in your web.xml file...that will make compression be the last thing
> done
> before the data is sent out.
> 
> Regards,
> Simon

That was the problem, Huh!!!
Sometimes you just miss some of the most basic of things.
Thanks for your quick response.

Regards,
Madhav

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

Re: GZipping JSF Response

2009-04-17 Thread Simon Kitching
Madhav Bhargava schrieb:
> Hi Cagatay,
> 
>  
> 
> I tried using the GZipFilter that comes along with ehcache as well. I
> configured the filter in web.xml and the mapping URL was just “*.jsf”.
> It used to give the same problem. Somehow the gzipped content is getting
> written to the IDE console instead of sending that to the browser.

It's probably just a filter order problem.

A servlet engine nests filters in the order they are declared in the
web.xml file. So make sure your gzip filter is the first filter declared
in your web.xml file...that will make compression be the last thing done
before the data is sent out.

Regards,
Simon


RE: GZipping JSF Response

2009-04-17 Thread Madhav Bhargava
Hi Cagatay,

I tried using the GZipFilter that comes along with ehcache as well. I 
configured the filter in web.xml and the mapping URL was just “*.jsf”. It used 
to give the same problem. Somehow the gzipped content is getting written to the 
IDE console instead of sending that to the browser.

Any pointer would be appreciated.

Regards,
Madhav

From: Cagatay Civici [mailto:cagatay.civ...@gmail.com]
I've used gzip filter with jsf and no problems, was working in was6 as well 
afair.
On Fri, Apr 17, 2009 at 3:06 PM, Madhav Bhargava 
mailto:madhav_bharg...@infosys.com>> wrote:
Yes.
Application server: Websphere 6.x

I have attached the files with this mail. Since it was printing the gzipped 
response on the console I double checked the response wrapper but could not 
find anything.

Is this because you cannot gzip using a filter in JSF? (It should not be 
because the response contains generated HTML)

Thanks,
Madhav

> -Original Message-
> From: Adrian Mitev 
> [mailto:adrian.mi...@googlemail.com<mailto:adrian.mi...@googlemail.com>]
> Sent: Friday, April 17, 2009 5:31 PM
> To: MyFaces Discussion
> Subject: Re: GZipping JSF Response
>
> What application server do you use? Websphere?
>
> On Fri, Apr 17, 2009 at 2:38 PM, Madhav Bhargava
> mailto:madhav_bharg...@infosys.com>> wrote:
> > Hi All,
> >
> >
> >
> > I have a heavy page and I am trying to reduce the response size by
> gzipping
> > the Http Response going back to the client from the server.
> >
> > Since I cannot install mod_deflate/mod_gzip on IBM HTTP server I have
> tried
> > to use the GZipFilter (provided by ehcache) and I also tried to
> create my
> > own custom filter.
> >
> >
> >
> > The contents are getting zipped but when the filter writes the
> response, it
> > prints the compressed response to the console instead of sending the
> > compressed response to the browser. Can gzipping work with JSF pages?
> >
> >
> >
> > Thanks & Regards,
> >
> > Madhav
> >
> > ext: 36110
> >
> >
> >
> >  CAUTION - Disclaimer *
> > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely
> > for the use of the addressee(s). If you are not the intended
> recipient,
> > please
> > notify the sender by e-mail and delete the original message. Further,
> you
> > are not
> > to copy, disclose, or distribute this e-mail or its contents to any
> other
> > person and
> > any such actions are unlawful. This e-mail may contain viruses.
> Infosys has
> > taken
> > every reasonable precaution to minimize this risk, but is not liable
> for any
> > damage
> > you may sustain as a result of any virus in this e-mail. You should
> carry
> > out your
> > own virus checks before opening the e-mail or attachment. Infosys
> reserves
> > the
> > right to monitor and review the content of all messages sent to or
> from this
> > e-mail
> > address. Messages sent to or from this e-mail address may be stored
> on the
> > Infosys e-mail system.
> > ***INFOSYS End of Disclaimer INFOSYS***
>
>
>
> --
> Although nobody can come back and make a new start, anyone can start
> now and make a new end



Re: GZipping JSF Response

2009-04-17 Thread Cagatay Civici
I've used gzip filter with jsf and no problems, was working in was6 as well
afair.

On Fri, Apr 17, 2009 at 3:06 PM, Madhav Bhargava <
madhav_bharg...@infosys.com> wrote:

> Yes.
> Application server: Websphere 6.x
>
> I have attached the files with this mail. Since it was printing the gzipped
> response on the console I double checked the response wrapper but could not
> find anything.
>
> Is this because you cannot gzip using a filter in JSF? (It should not be
> because the response contains generated HTML)
>
> Thanks,
> Madhav
>
> > -Original Message-
> > From: Adrian Mitev [mailto:adrian.mi...@googlemail.com]
> > Sent: Friday, April 17, 2009 5:31 PM
> > To: MyFaces Discussion
> > Subject: Re: GZipping JSF Response
> >
> > What application server do you use? Websphere?
> >
> > On Fri, Apr 17, 2009 at 2:38 PM, Madhav Bhargava
> >  wrote:
> > > Hi All,
> > >
> > >
> > >
> > > I have a heavy page and I am trying to reduce the response size by
> > gzipping
> > > the Http Response going back to the client from the server.
> > >
> > > Since I cannot install mod_deflate/mod_gzip on IBM HTTP server I have
> > tried
> > > to use the GZipFilter (provided by ehcache) and I also tried to
> > create my
> > > own custom filter.
> > >
> > >
> > >
> > > The contents are getting zipped but when the filter writes the
> > response, it
> > > prints the compressed response to the console instead of sending the
> > > compressed response to the browser. Can gzipping work with JSF pages?
> > >
> > >
> > >
> > > Thanks & Regards,
> > >
> > > Madhav
> > >
> > > ext: 36110
> > >
> > >
> > >
> > >  CAUTION - Disclaimer *
> > > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> > solely
> > > for the use of the addressee(s). If you are not the intended
> > recipient,
> > > please
> > > notify the sender by e-mail and delete the original message. Further,
> > you
> > > are not
> > > to copy, disclose, or distribute this e-mail or its contents to any
> > other
> > > person and
> > > any such actions are unlawful. This e-mail may contain viruses.
> > Infosys has
> > > taken
> > > every reasonable precaution to minimize this risk, but is not liable
> > for any
> > > damage
> > > you may sustain as a result of any virus in this e-mail. You should
> > carry
> > > out your
> > > own virus checks before opening the e-mail or attachment. Infosys
> > reserves
> > > the
> > > right to monitor and review the content of all messages sent to or
> > from this
> > > e-mail
> > > address. Messages sent to or from this e-mail address may be stored
> > on the
> > > Infosys e-mail system.
> > > ***INFOSYS End of Disclaimer INFOSYS***
> >
> >
> >
> > --
> > Although nobody can come back and make a new start, anyone can start
> > now and make a new end
>


RE: GZipping JSF Response

2009-04-17 Thread Madhav Bhargava
Yes.
Application server: Websphere 6.x

I have attached the files with this mail. Since it was printing the gzipped 
response on the console I double checked the response wrapper but could not 
find anything.

Is this because you cannot gzip using a filter in JSF? (It should not be 
because the response contains generated HTML)

Thanks,
Madhav

> -Original Message-
> From: Adrian Mitev [mailto:adrian.mi...@googlemail.com]
> Sent: Friday, April 17, 2009 5:31 PM
> To: MyFaces Discussion
> Subject: Re: GZipping JSF Response
> 
> What application server do you use? Websphere?
> 
> On Fri, Apr 17, 2009 at 2:38 PM, Madhav Bhargava
>  wrote:
> > Hi All,
> >
> >
> >
> > I have a heavy page and I am trying to reduce the response size by
> gzipping
> > the Http Response going back to the client from the server.
> >
> > Since I cannot install mod_deflate/mod_gzip on IBM HTTP server I have
> tried
> > to use the GZipFilter (provided by ehcache) and I also tried to
> create my
> > own custom filter.
> >
> >
> >
> > The contents are getting zipped but when the filter writes the
> response, it
> > prints the compressed response to the console instead of sending the
> > compressed response to the browser. Can gzipping work with JSF pages?
> >
> >
> >
> > Thanks & Regards,
> >
> > Madhav
> >
> > ext: 36110
> >
> >
> >
> >  CAUTION - Disclaimer *
> > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely
> > for the use of the addressee(s). If you are not the intended
> recipient,
> > please
> > notify the sender by e-mail and delete the original message. Further,
> you
> > are not
> > to copy, disclose, or distribute this e-mail or its contents to any
> other
> > person and
> > any such actions are unlawful. This e-mail may contain viruses.
> Infosys has
> > taken
> > every reasonable precaution to minimize this risk, but is not liable
> for any
> > damage
> > you may sustain as a result of any virus in this e-mail. You should
> carry
> > out your
> > own virus checks before opening the e-mail or attachment. Infosys
> reserves
> > the
> > right to monitor and review the content of all messages sent to or
> from this
> > e-mail
> > address. Messages sent to or from this e-mail address may be stored
> on the
> > Infosys e-mail system.
> > ***INFOSYS End of Disclaimer INFOSYS***
> 
> 
> 
> --
> Although nobody can come back and make a new start, anyone can start
> now and make a new end


GZipCompressionFilter.java
Description: GZipCompressionFilter.java


GZIPResponseStream.java
Description: GZIPResponseStream.java


GZipResponseWrapper.java
Description: GZipResponseWrapper.java


Re: GZipping JSF Response

2009-04-17 Thread Adrian Mitev
What application server do you use? Websphere?

On Fri, Apr 17, 2009 at 2:38 PM, Madhav Bhargava
 wrote:
> Hi All,
>
>
>
> I have a heavy page and I am trying to reduce the response size by gzipping
> the Http Response going back to the client from the server.
>
> Since I cannot install mod_deflate/mod_gzip on IBM HTTP server I have tried
> to use the GZipFilter (provided by ehcache) and I also tried to create my
> own custom filter.
>
>
>
> The contents are getting zipped but when the filter writes the response, it
> prints the compressed response to the console instead of sending the
> compressed response to the browser. Can gzipping work with JSF pages?
>
>
>
> Thanks & Regards,
>
> Madhav
>
> ext: 36110
>
>
>
>  CAUTION - Disclaimer *
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient,
> please
> notify the sender by e-mail and delete the original message. Further, you
> are not
> to copy, disclose, or distribute this e-mail or its contents to any other
> person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has
> taken
> every reasonable precaution to minimize this risk, but is not liable for any
> damage
> you may sustain as a result of any virus in this e-mail. You should carry
> out your
> own virus checks before opening the e-mail or attachment. Infosys reserves
> the
> right to monitor and review the content of all messages sent to or from this
> e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS End of Disclaimer INFOSYS***



-- 
Although nobody can come back and make a new start, anyone can start
now and make a new end


GZipping JSF Response

2009-04-17 Thread Madhav Bhargava
Hi All,

I have a heavy page and I am trying to reduce the response size by gzipping the 
Http Response going back to the client from the server.
Since I cannot install mod_deflate/mod_gzip on IBM HTTP server I have tried to 
use the GZipFilter (provided by ehcache) and I also tried to create my own 
custom filter.

The contents are getting zipped but when the filter writes the response, it 
prints the compressed response to the console instead of sending the compressed 
response to the browser. Can gzipping work with JSF pages?

Thanks & Regards,
Madhav
ext: 36110


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***