Librairie de siteMesh et paramétrage

This commit is contained in:
Nicolas Michard
2008-01-19 18:29:32 +00:00
parent e2b70a4e9b
commit 74314c8d56
6 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<decorators defaultdir="/WEB-INF/decorators">
<!-- Principal decorator for all pages -->
<decorator name="main" page="main.jsp">
<pattern>/*</pattern>
</decorator>
<decorator name="empty" page="empty.jsp"/>
</decorators>

View File

@@ -0,0 +1,4 @@
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page" %>
<decorator:body />

View File

@@ -0,0 +1 @@
<h1>C'est le footer</h1>

View File

@@ -0,0 +1,21 @@
<!-- Include -->
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page" %>
<!-- Doctype -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><decorator:title default="YACOS" /></title>
<decorator:head />
</head>
<body>
BODY de la page d<>cor<6F>e :
<decorator:body />
/BODY de la page d<>cor<6F>e
<div><page:applyDecorator name="empty" page="/WEB-INF/decorators/footer.jsp" /></div>
</body>
</html>

Binary file not shown.

View File

@@ -30,4 +30,15 @@
</taglib>
</jsp-config>
<!-- SiteMesh Integration declaration -->
<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>/*</url-pattern>
</filter-mapping>
</web-app>