Java Reference
In-Depth Information
<tr id="body">
<decorator:body />
</tr>
<tr id="footer">
<h3>eInsure - All rights reserved </h3>
</tr>
</table>
</html>
Note that I have used a SiteMesh-specific tag library to create the layout. The
decorator:title tag picks up the title information from the response sent by the front
controller. Similarly, the decorator:head and decorator:body tags include the information
in the head and body tags of the original response and put them in the layout. The header
and footer information is consolidated at a common place in the layout. To use this lay-
out framework and the different tags, you must include SiteMesh filter and tag definition
in the web.xml file, as shown in Listing 3-55.
Listing 3-55. web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns=" http://java.sun.com/xml/ns/j2ee"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
<!-- Start of SiteMesh filter config -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
Search WWH ::




Custom Search