||Two Servlet Filters Every Web Application Should Have|
|Subject:||Dealing with "This output stream has already been closed" Errors|
Several people have informed me that sometimes the GZIP filter throws an IOException with the above message. This occurs if the container/framework/your-code or whatever tries to close the output stream more than once -- which shouldn't happen. However, allowing for the filter's close() method to be called multiple times doesn't hurt the code.