error page

Posted on 2004-11-14
Medium Priority
Last Modified: 2010-04-01
I'm using struts tiles framework for my jsp's.  so I inculde header footer and body into those templates for every JSP.

Whenever there is an error in Body JSP i need to display error page, I'm doing it so by having this line at top
<%@ page errorpage="error.jsp " %>
 My problem here is when any error occurs error page is display into the location where the body is included, and headers and footers are seen as they are. I dont want to display any headers(menu) footers when there is an error, the whole page should go to the error.jsp.

Saying it more clear, i have 3 jsp's,, layout.jsp, main.jsp , mainBody.jsp.  in main.jsp i use layout.jsp as template and insert mainBody.jsp into appropriate attribute.

Any help is appreciated
Question by:soft_techy
1 Comment
LVL 54

Accepted Solution

Ryan Chong earned 500 total points
ID: 12624877
you may try like create a page redirector, to redirect the top.location to error page?

try include your file like:

<%@ page errorpage="errorRedirector.jsp" %>

in errorRedirector.jsp:

<script language="javascript">
   top.location.href = "error.jsp";

* Code not tested yet to give you an idea ;-)

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

Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

840 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