Just as a side note, if you are using apache as a web server, you could also
just turn on the mod_deflate or mod_gzip in apache and not have to screw
around the the filter in your servlet engine.  

Kmart Tech News
news://uskihsvtfinsys
 
The essence of knowledge is, having it, to apply it; not having it, to
confess your ignorance. 

-----Original Message-----
From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 2:26 AM
To: 'Struts Users Mailing List'
Subject: Cahin actions and GZIP filter



Hello,

  I�m trying to use a filter to compress my application using GZIP. I have
read:
        
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html

  and it seems to work except when I chain actions. It uses a RequestWrapper
for not writing the stream to the response. If I call one action which
executes a forward to another action, I get te exception:

java.io.IOException: Cannot flush a closed output stream
        at
es.aranzadi.base.controller.CompressionResponseStream.flush(CompressionRespo
nseStream.java:84)
        at
es.aranzadi.base.controller.CompressionResponseWrapper.flushBuffer(Compressi
onResponseWrapper.java:38)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.
java:244)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.GetParametersRequestDispatcher.forward(GetParametersReques
tDispatcher.java:189)
        at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
        at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
        at
es.aranzadi.base.controller.CompressionFilter.doFilter(CompressionFilter..jav
a:67)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:560)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patcher.java:306)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
767)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
        at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:803)
        at java.lang.Thread.run(Thread.java:484)


        Why the stream is closed? My application never colses the response
stream. Can anybody help me?

    Jose R.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-----------------------------------------
This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to