Hi Martin,
The filter is just a pass through to application code - it only gets to work if 
there is runtime exception coming back from processing request. 

ErrorHandlerFilter  is mapped to REQUEST, FORWARD, INCLUDE

It has 

Try{
    filterChain.doFilter(request, response);
} catch (throwable th){
///   ..process th. (setting some attributes in requests for presentation in 
errorPage.jsp
   request.getRequestDispatcher("errorPage.jsp").forward(
                request,
                response);
}

Example execution path where the issue happens is the following 

Browser-> servletX->forward to result.sp; on result.jsp there is <jsp:include 
"someServlet"/>  and "someServlet" throws runtime.

I hope it makes sense :)

Thanks


-----Original Message-----
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Saturday, July 25, 2009 6:46 PM
To: Tomcat Users List
Subject: RE: JSPwriterImpl generates IO exception while processing 
<jsp:include> that gets forwarded.


dont understand why you want to forward before jsp:include has been processed? 

could you explain a bit about webapp architecture or workflow you wish to 
implement?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: leonard.gest...@markettools.com
> To: users@tomcat.apache.org
> Date: Sat, 25 Jul 2009 15:08:51 -0700
> Subject: JSPwriterImpl generates IO exception while processing <jsp:include> 
> that gets forwarded.
> 
> Hello, 
> This is my second attempt to get anyone's opinion if what's happening is a 
> defect or it can be prevented somehow. I hope it generates more replies. 
> 
> In my webapp application I have servlet filter that handles error handling 
> for runtime exceptions; when such exception happens, it forwards request to 
> error page where user-frienldy error is presented. 
> It works fine for most of the cases, however, if runtime exception happens 
> during processing of <jsp:include/> directive, I am getting various 
> exceptions in the log  (depending on the location of <jsp:include/> with 
> respect to other tags.)
> These exceptions do not appear to cause any harm, however I was curious why 
> are they happening in the first place. Is it illegal to forward request while 
> processing "include"?  This is 6.x version of tomcat.
> 
> Exception might look like this:
> 
>   java.io.IOException: Stream closed  
> org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
> 
> Or like this: 
> 
> Caused by: java.io.IOException: Stream closed
>                 at 
> org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
>                 at 
> org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
>                 at 
> org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:188)
>                 ... 45 more
> 
> Caused by: java.io.IOException: Stream closed
>                 at 
> org.apache.jasper.runtime.BodyContentImpl.ensureOpen(BodyContentImpl.java:582)
>                 at 
> org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:142)
>                 at 
> org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:159)
>                 at 
> org.apache.jsp.WEB_002dINF.jsp.projects_002dtab_002dcontainer_jsp._jspx_meth_stripes_005flayout_002dcomponent_005f1(projects_002dtab_002dcontainer_jsp.java:484)
>                 at 
> org.apache.jsp.WEB_002dINF.jsp.projects_002dtab_002dcontainer_jsp._jspx_meth_stripes_005flayout_002drender_005f0(projects_002dtab_002dcontainer_jsp.java:138)
>                 at org.apache
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
BingT brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to