aspose file tools*
The moose likes Servlets and the fly likes Filter Problem in Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Filter Problem in Servlet" Watch "Filter Problem in Servlet" New topic
Author

Filter Problem in Servlet

Sandeep Gupta
Greenhorn

Joined: Jan 22, 2003
Posts: 1
I have implemented filter that compress the response and send back to browser . Problem is that I am getting Garbage Value in Browser
Marty Hall
Author
Ranch Hand

Joined: Jan 02, 2003
Posts: 111
I have implemented filter that compress the response and send back to browser . Problem is that I am getting Garbage Value in Browser

I have had good luck using a Filter that does gzip compression. Before trying to compress, did you check the Accept-Encoding request header to be sure gzip was listed? Did you set the Content-Encoding response header to tell the browser you were sending gzipped content? Did you remember to call "close" on the GZIPOutputStream? If so, post the URL of your filter so we can look?
Mine is online in Chapter 9 of http://archive.moreservlets.com/
Cheers-
- Marty


Java training and consulting
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filter Problem in Servlet