Automatically Including Preludes and Codas in JSP

By: Charles Viewed: 169 times  Printer Friendly Format    


Through the use of the <include-prelude> and <include-coda> elements, you can automatically include a page before and after the evaluation of a group of pages. The <include-prelude> element is a context-relative path that must correspond to an element in the web application. When the element is present, the given path will be automatically included (as in an include directive) at the beginning of each JSP page in this

<jsp-property-group>.

The <include-coda> element is a context-relative path that must correspond to an element in the web application. When the element is present, the given path will be automatically included (as in an include directive) at the end of each JSP page in this <jsp-property-group>. The following fragment shows a file being included at the start and end of every JSP page in the web application:

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<include-prelude>/header.jsp</include-prelude>
<include-coda>/footer.jsp</include-coda>
</jsp-property-group
</jsp-config>



Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial