error page

Posted on 2004-11-14
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 48

    Accepted Solution

    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 ;-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 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

    16 Experts available now in Live!

    Get 1:1 Help Now