Women in Technology

Hear us Roar



Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   GZIP Filter and exception thrown
Date:   2004-01-09 12:08:20
From:   anonymous2
I tried to use the GZIP filter on two different AppServers and both gave me the same exception:
java.io.IOException: Cannot flush a closed output stream
GZIPResponseStream.flush(GZIPResponseStream.java:76)
at GZIPResponseWrapper.flushBuffer(GZIPResponseWrapper.java:45)


This happened on JBoss and Oracle 9iAS 9.0.3


Actually, it does not happen all the time. I also use Struts framework for both apps.


Any ideas?? Any one else encounter same kind of exception?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • GZIP Filter and exception thrown
    2004-01-18 22:11:14  jfalkner [View]

    The filter only throws this exception if the close() method is called more than once, which it shouldn't be.... Several people have mentioned problems with using these filters and Struts, but the extent of the problem seems to be this exception.

    A quick fix is to edit the filter's close() method to stop it from throwing the exception. However, I'm not going to roll the change in to the code until I have some more time to figure out what Struts is doing.