This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here goes another one. I know other than the import page directive, none can be repeated within a page. But what happens if you do, for instance end up having two errorPage declarations either typing in directly or as a (hopefully unintended ) consequence of a page include. One would think it generates a compilation error. However, when I tried this with my JRun3.1, it happily used the second error page. Surprisingly the second errorPage directive superceded the first one. Is this normal? I hope not
Main page has page directive with errorPage attribute and you want to include another page: using jsp:include If you include a jsp-page that has page directive with errorPage attribute in it, that should not give you a problem ( request time ). using include directive If you include jsp-page that has page directive with errorPage attribute in it, than u should get an error since two page directive with errorPage attribute will end up in a single final page ( compilation time ) This is my first thought, I have to try
Tomcat 4.0.1 on NT. include Directive: Translation time Error. Page directive: can't have multiple occurrences of errorPage include Action: Scenario: main page had an errorPage. Included(action) another page with an errorPage attribute. Included (action) a third page which is made to throw an ArithmaticException. Result: errorPage on the main page showed up. I know that the Exception is being thrown because when I removed the errorPage in the main page I saw the exception on the Browser. I think in the light of this, its important to know the scope of the "page" directive in the Spec. Seems like Tomcat and JRun behave differently. - satya