Librairie de siteMesh et paramétrage
This commit is contained in:
11
YACOSWeb/WebContent/WEB-INF/decorators.xml
Normal file
11
YACOSWeb/WebContent/WEB-INF/decorators.xml
Normal 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>
|
||||
4
YACOSWeb/WebContent/WEB-INF/decorators/empty.jsp
Normal file
4
YACOSWeb/WebContent/WEB-INF/decorators/empty.jsp
Normal 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 />
|
||||
1
YACOSWeb/WebContent/WEB-INF/decorators/footer.jsp
Normal file
1
YACOSWeb/WebContent/WEB-INF/decorators/footer.jsp
Normal file
@@ -0,0 +1 @@
|
||||
<h1>C'est le footer</h1>
|
||||
21
YACOSWeb/WebContent/WEB-INF/decorators/main.jsp
Normal file
21
YACOSWeb/WebContent/WEB-INF/decorators/main.jsp
Normal 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>
|
||||
BIN
YACOSWeb/WebContent/WEB-INF/lib/sitemesh-2.3.jar
Normal file
BIN
YACOSWeb/WebContent/WEB-INF/lib/sitemesh-2.3.jar
Normal file
Binary file not shown.
@@ -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>
|
||||
Reference in New Issue
Block a user