<jsp:include and errorPage

J

Jon Rasmussen

I have a JSP that that is constructed by including some dynamic
content:

<%@ page errorPage="/Error.jsp" %>
[...]

<jsp:include page="/generic/topMenu.jsp" flush="true">
<jsp:param name="top_menu" value="displayHome" />
<jsp:param name="top_menu_title" value="Home" />
</jsp:include>

[..body content...]

</html>


When an error 500 situation occurs in the main section of the page, I
want it to redirect to the Error.jsp page.

At the moment, when running on WebSphere 5.1, the JSP generate the
content of the topMenu include, and than insert the content of
Error.jsp into the same page.

Is there a way I can make sure that only Error.jsp is loaded, and not
any of the includes?
This was fine under WebLogic.

Thanks,

Jon Rasmussen
 
C

Chris Smith

Jon said:
I have a JSP that that is constructed by including some dynamic
content:

<%@ page errorPage="/Error.jsp" %>
[...]

<jsp:include page="/generic/topMenu.jsp" flush="true">
<jsp:param name="top_menu" value="displayHome" />
<jsp:param name="top_menu_title" value="Home" />
</jsp:include>

[..body content...]

</html>


When an error 500 situation occurs in the main section of the page, I
want it to redirect to the Error.jsp page.

Then set flush to false, not true. Once you've flushed your output to
the client, you can't go back in time and take it back. At that point,
there's no clean way to deal with an error.
This was fine under WebLogic.

I'm having trouble imagining how that possibly could have been the case.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top