tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrhein, Thomas" <tamrh...@debis.com>
Subject errorpage not used if exception after jsp:include
Date Tue, 21 Mar 2000 14:43:36 GMT
Hi,

I have following statements in my JSP:

<%@ page language="java" session="true" autoFlush="true"
errorPage="/myerrorpage.jsp" isErrorPage="false" %>
...
<jsp:include page="/firstfile.jsp?id=0" flush="true" />
...
<%@ include file="/secondfile.jsp" %>
...

I work with error pages. I have the problem, that if an exception is thrown
in secondfile.jsp I get a ServletException (see below) which is printed out
in my output and myerrorpage.jsp is not used.
If I change the order to:

...
<%@ include file="/secondfile.jsp" %>
...
<jsp:include page="/firstfile.jsp?id=0" flush="true" />
...

it works fine.
But my includes should be in a specified order.


Why can't I use errorpages, after calling other generated servlets within my
page?
I think it could be better to make a directive include of firstfile.jsp. But
then I can't append any parameters...

Anybody an answer or workaround?

Thanx,

Thomas




Internal Servlet Error:

javax.servlet.ServletException: Error: Attempt to clear a buffer that's
already been flushed
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:147)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334
)
        at java.lang.Thread.run(Thread.java:479)

Root cause: 

java.io.IOException: Error: Attempt to clear a buffer that's already been
flushed
        at
org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:166)
        at
mdmm._0002fmdmm_0002fmodul_0002ejspmodul_jsp_6._jspService(_0002fmdmm_0002fm
odul_0002ejspmodul_jsp_6.java, Compiled Code)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:169)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:147)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334
)
        at java.lang.Thread.run(Thread.java:479)

Mime
View raw message