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
|
<html>
<head>
<title>SiteMesh Installation and Configuration</title>
</head>
<body>
<p>Once SiteMesh has been <a href="download.html">downloaded (or built)</a>, configuration is simple.</p>
<ul>
<li>Setup a web-app as usual (or skip all this by using the pre-configured <a href="download.html">sitemesh-blank.war</a>).</li>
<li>Copy <b><code>sitemesh-2.4.1.jar</code></b> into <b><code>[web-app]/WEB-INF/lib</code></b>.</li>
<li>Create the file <b><code>[web-app]/WEB-INF/decorators.xml</code></b> that contains the following:</p>
<blockquote><code><decorators><br></decorators></code></blockquote></li>
<li>(Optional) Create the file <b><code>[web-app]/WEB-INF/sitemesh.xml</code></b> that contains the following:
<pre style="border: 1px solid #999999; padding: 5px">
<sitemesh>
<property name="decorators-file" value="/WEB-INF/decorators.xml" />
<excludes file="${decorators-file}" />
<page-parsers>
<parser content-type="text/html"
class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
<parser content-type="text/html;charset=ISO-8859-1"
class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
</page-parsers>
<decorator-mappers>
<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}" />
</mapper>
</decorator-mappers>
</sitemesh>
</pre>
<li>Add the following to <b><code>[web-app]/WEB-INF/web.xml</code></b> within the <b><code><web-app></code></b> tag:</p>
<pre style="border: 1px solid #999999; padding: 5px">
<filter>
<filter-name><b>sitemesh</b></filter-name>
<filter-class><b>com.opensymphony.sitemesh.webapp.SiteMeshFilter</b></filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern><b>/*</b></url-pattern>
</filter-mapping>
</pre>
</ul>
<p>That's it! Your web-app is now setup to use SiteMesh, you can now start <a href="decorators.html">building decorators</a>.</p>
</body>
</html>
|