If you are including jsp with jsp:include element you need to put <%@ page 
errorPage="..."> tags on every file, including subpages. Otherwise, using the include 
directive it is not necessary.

Take a look at this link: 
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPIntro8.html

Regards,

Enrique Sanchez

-----Original Message-----
From: Bob Arnott [mailto:[EMAIL PROTECTED]
Sent: Viernes, 28 de Febrero de 2003 05:29 a.m.
To: [EMAIL PROTECTED]
Subject: Error pages


I'm currently trying to get an error page working on a small app we've
writen and am having some trouble. We're using a JSP front end with struts
and an ejb to communicate with the database. In the web.xml file I've
deffined an <error-page> tag for 500 and Servletexception, which seems to
work. My currenbt problem is with the JSP pages. I've put a <%@ page
errorPage="../ErrorPage.jsp" %> at the top of every file (obviously with
the correct path fo files at different levels), but am having a problem
with files included with the <jsp:include> tag.

If an error is thrown on a sub page, it seems to be loading the error page
instead of the sub page. How can I get it to load the error page over the
top of the current page and not have it inserted into the current page...?
Do I need <%@ page errorPage="..."> tags on every file, including sub
pages...?

Cheers,

--
Bob Arnott
Software Engineer, Consulting
Accelrys Ltd.
334 Cambridge Science Park
Cambridge, CB4 0WN
+44 (0) 1223 228621

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to