Solved

What is the scope of <%@ page errorPage="" %>? Does it get passed to jsp:forwarded pages? Does it get passed to jsp:included pages?

Posted on 2004-08-14
4
250 Views
Last Modified: 2010-04-01
thanks
sudha
0
Comment
Question by:sudhaker
  • 3
4 Comments
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 125 total points
ID: 11801840
The errorPage="SomePage" attribute can be present in either the JSP that includes or forwards to another JSP OR in the included or forwarded JSP OR in both the parent/calling JSP and the JSPs included/forwarded. In all these cases the attribute will work .  The control will 'not be' redirected to the errorPage specified from these JSP pages, in case the exception is explicitly caught in them. To redirect the control to the errorPage either do not catch an exception in the JSP page OR throw an exception explicitly. I did some experimentation and found out that errorPage is passed on to forwarded and included pages. The forwaded or included page can always override the errorPage with own <%@ page errorPage="errorPage.jsp" %> directive.

And also note that This is not equivalent to try{} catch(Exception ex) {Response.sendRedirect("error.jsp"); } as response.sendRedirect("error.jsp") will redirect the response to other page - is like forward. While <%@ page errorPage = .... is like include.
0
 

Author Comment

by:sudhaker
ID: 11801841
Hmmm
0
 

Author Comment

by:sudhaker
ID: 11801847
ok i understand that
0
 

Author Comment

by:sudhaker
ID: 11801848
just got a silly doubt
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now