This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Servlets and the fly likes Got funny character from compacting servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Got funny character from compacting servlet" Watch "Got funny character from compacting servlet" New topic
Author

Got funny character from compacting servlet

Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
I've tried this:







And the browser displayed some weird characters instead of a page. Help? THanks
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2407
Any particular reason you're writing your own filter instead of using a ready-made one like http://onjava.com/onjava/2003/11/19/filters.html ?
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
I think the example is not complete, the GZIPResponseWrapper class is not there.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2407
The link to the source code is at the bottom of the page.
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
Thanks, I didn't see that before.
Hengki Widjaja
Ranch Hand

Joined: Oct 31, 2011
Posts: 44
Just when everything seems to work, I got several errors pop up.
java.io.IOException: Cannot flush a closed output stream

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6603
    
    1

Can you post the stack trace and the java file on which the exception occurs ?


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Got funny character from compacting servlet
 
Similar Threads
Response Wrappers and JSPs
Getting contents form the Response Object
How do I avoid IllegalState when calling getReader in chain?
Response filter - doFilter() never returns
JSP with large data loads slow in Solaris10 OS , we are using Jrun4 and nested logic:iterate