• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems with Compression Servlet Filter

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I have a simple requirement, I want to compress the response contents. I'm using a filter, wherein I first check if the browser supports zipping. I'm also printing debugging statements inside the write() method, they are getting printed but the problem is that I don't get to see anything on the page (its blank).

Pls. help..
Here is the code...

Filter Code




Customized Response Wrapper Code


The problem is that i'm getting a blank page.
I have tried to run on IE 6 and Mozilla 5.0 and I'm using Tomcat 5 at the web container.

Thanks,
Reema

[ August 07, 2006: Message edited by: Reema Patel ]
[ August 07, 2006: Message edited by: Reema Patel ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use UBB code tags when posting more than one line of code.
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Thread hi-jack removed. Reema, please ask your questions in your own topics that you open. Do not hi-jack other people's topics.]
[ August 08, 2006: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat has compression built in.
You just have to turn it on.

Look for the "compression" attribute in this http connector config page:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
I can now run the filter code on BEA WLS, but the problem is that it is showing junk text. Also, ironically the filter mechanism is taking along time.
Reema
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Reema Patel:
Hey,
I can now run the filter code on BEA WLS, but the problem is that it is showing junk text. Also, ironically the filter mechanism is taking along time.
Reema




I thought you said you were using Tomcat. ? .
[ August 11, 2006: Message edited by: Ben Souther ]
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Ben,
Thanks for the post.
Earlier I used Tomcat 5.
This time I'm using WLS 8

Thanks,
Reema
 
reply
    Bookmark Topic Watch Topic
  • New Topic