This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See jsp page for which errorpage is set to error.jsp. The normal jsp page and error jsp page contains <jsp:include page="header.html" flush="true"/>. If an exception is thrown after the jsp:include statement in the normal jsp page, the error page is not displayed(only the header of normal page is displayed). Infact, it doesn't execute the statments after jsp:include in error page. However, if the exception occurs before <jsp:include, then the error page is displayed without any problems. normal jsp page:- <%@ page import="imported classes" errorPage="systemError.jsp" %> .. <jsp:include page="header.html" flush="true"/> ..
<jsp:include>(action) is not the same as the <%@ include file="1.html">(directive) <jsp:include> is a Run time Addition of page. Since the Error is executed @ the start of the page. There is no Execution or the flow to the rest of the page.
Try with <%@ include file="1.html">(directive).. This might suffice to your problem.
posted 12 years ago
Hi Vince, flush="false" doesn't work as it is giving compilation errors. looks like flush="true" is must atleast for older versions.
Hi Cecil, It is true that the jsp:include in normal jsp shdn't work as there is an exception is thrown, but the jsp:include in error page shd work, right? As u said, <%@include file=""%> will work but it is not dynamic like jsp:include, right?