Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
263 Views
Last Modified: 2010-04-01
thanks
sudha
0
Comment
Question by:sudhaker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read on to get a few ideas on how to promote your next corporate event.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

660 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