As you all know, errorPage attribute of JSP page directive is used to take the user to an error page (which may be common for all the pages) in case of any exceptions.
Guess what will be the result if we try to load the following JPS files.
1) first.jsp
it has the following statements
include file=”included.jsp”
page errorPage=”ErrorPage1.jsp”
2) include.jsp
page errorPage=”ErrorPage2.jsp”
Hello World
If we load first.jsp, it will throw an error. The reason is – we can’t have more than one occurrence of errorPage attribute with different values.
ie. first.jsp will have the second errorPage attribute with a different value when include.jsp is included.
thanx,
Sandeep