tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrhein, Thomas" <tamrh...@debis.com>
Subject AW: errorpage not used if exception after jsp:include
Date Tue, 21 Mar 2000 15:30:31 GMT
can you give me an example of how to use the setAttribute method
in my JSP?

Thomas

-----Ursprüngliche Nachricht-----
Von: William Brogden
Gesendet am: Dienstag, 21. März 2000 16:16
An: tomcat-user@jakarta.apache.org
Betreff: Re: errorpage not used if exception after jsp:include



"Amrhein, Thomas" wrote:
> 
> 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...

As I recall, you can attach any object to the request using the 
setAttribute method, wouldn't that solve your parameter problem?

WBB

--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message