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
259 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 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

Technology Partners: 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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Part One of the two-part Q&A series with MalwareTech.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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