aspose file tools*
The moose likes Servlets and the fly likes Got funny character from compacting servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
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: 2408
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: 2408
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: 6661
    
    5

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


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Got funny character from compacting servlet