-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
189 lines (138 loc) · 5.97 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
Alteração para navegação ajax
* Adicionar o filtro no WEB-INF/web.xml
<!-- Mapeamento para o SiteMesh customizado para navegação em JSON -->
<filter>
<filter-name>AjaxSiteMesh</filter-name>
<filter-class>com.commons.ajax.sitemesh.AjaxSiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AjaxSiteMesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
*************************************
** OpenSymphony SiteMesh 2.4.1 **
*************************************
SiteMesh is a web-page layout system that can be used to abstract common look
and feel from the functionality of a web-application and to assemble large
webpages from smaller components. Pages and components can have meta-data
extracted from them (such as body, title and meta-tags) which can be used by
decorators (skins) that are applied.
SiteMesh won't tread on your toes or force you to work in a certain way (except
for cleaner) - you install and carry on working as before. It seamlessly fits in
with existing frameworks.
Forget the hype - just try it! You'll be impressed with how it can simplify
things.
--------------------------
-- Obtaining --
--------------------------
The latest version of SiteMesh can be obtained from:
http://www.opensymphony.com/sitemesh/
--------------------------
-- Requirements --
--------------------------
SiteMesh requires a Java Servlet container conforming to the Servlet 2.3
specification. Versions prior to 2.3 are not enough.
Currently known containers that support this and SiteMesh was tested with:
* Orion 1.5.4 and up - http://www.orionserver.com
* Tomcat 4.0, 4.1 and 5.0.19 - http://jakarta.apache.org/tomcat
* Resin 2.1.11, 2.1.12, 2.1.13 and 3.0.7 - http://www.caucho.com
* Oracle OC4J 2 - http://www.oracle.com
* WebLogic 7.0 SP2, 8.1 and 8.1 SP2 - http://www.bea.com
* WebSphere 5.0 - http://www.ibm.com
* Jetty 4.2.20 - http://jetty.mortbay.org
--------------------------
-- Installation --
--------------------------
* Copy sitemesh-@VERSION@.jar to the WEB-INF/lib/ directory of your web-app.
* OPTIONAL: Copy sitemesh.xml to the WEB-INF/ directory if you need to specify a custom
decorator mapper configuration then the default configuration.
* Add the following to WEB-INF/web.xml:
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
* ORION USERS ONLY. For performance reasons, Orion does not auto-load tab library descriptors
from Jars by default. To get passed this you will also have to copy sitemesh-decorator.tld
and sitemesh-page.tld to WEB-INF/lib and add the following to WEB-INF/web.xml:
<taglib>
<taglib-uri>http://www.opensymphony.com/sitemesh/decorator</taglib-uri>
<taglib-location>/WEB-INF/lib/sitemesh-decorator.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://www.opensymphony.com/sitemesh/page</taglib-uri>
<taglib-location>/WEB-INF/lib/sitemesh-page.tld</taglib-location>
</taglib>
--------------------------
-- Getting started --
--------------------------
Ok, let's assume you have some basic JSPs already on the site.
These should contain vanilla HTML.
If you don't, here's a JSP to get you started (test.jsp).
<html>
<head>
<title>Hello world</title>
</head>
<body>
<p>Today is <%= new java.util.Date() %>.</p>
</body>
</html>
Once you have some content (preferably more imaginative than the example above),
a decorator should be created (decorator.jsp).
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<html>
<head>
<title>My Site - <decorator:title default="Welcome!" /></title>
<decorator:head />
</head>
<body>
<decorator:body />
</body>
</html>
Now you need tell SiteMesh about that decorator and when to use it. Create the
file WEB-INF/decorators.xml:
<decorators>
<decorator name="mydecorator" page="/decorator.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
Access your original JSP (test.jsp) though your web-browser and it should look
pretty normal. Now if you add some styling to your decorator it shall
automatically be applied to all the other pages in your web-app.
You can define as many decorators as you want in decorators.xml. Example:
<decorators defaultdir="/decorators">
<decorator name="default" page="default.jsp">
<pattern>/*</pattern>
</decorator>
<decorator name="anotherdecorator" page="decorator2.jsp">
<pattern>/subdir/*</pattern>
</decorator>
<decorator name="htmldecorator" page="html.jsp">
<pattern>*.html</pattern>
<pattern>*.htm</pattern>
</decorator>
<decorator name="none">
<!-- These files will not get decorated. -->
<pattern>/anotherdir/*</pattern>
</decorator>
</decorators>
--------------------------
-- Further support --
--------------------------
You get the idea. Play around. See the SiteMesh website for
full documentation.
http://www.opensymphony.com/sitemesh/
--------------------------
-- Credits --
--------------------------
Thank these guys:
* Mathias Bogaert <NOSPAMm.bogaert@memenco.com>
* Mike Cannon-Brookes <mikeNOSPAM@atlassian.com>
* Victor Salaman <salamanNOSPAM@teknos.com>
* Joseph Ottinger <joeoNOSPAM@adjacency.org>
* Hani Suleiman <NOSPAMfate@users.sourceforge.net>
* Scott Farquhar <scottNOSPAM@atlassian.com>
- Joe Walnes <joe@NOSPAMtruemesh.com>