File: install.html

package info (click to toggle)
sitemesh 2.4.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,792 kB
  • sloc: java: 6,689; xml: 514; jsp: 393; perl: 64; makefile: 17; sh: 9
file content (56 lines) | stat: -rw-r--r-- 2,343 bytes parent folder | download | duplicates (5)
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>&lt;decorators&gt;<br>&lt;/decorators&gt;</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">
&lt;sitemesh&gt;
    &lt;property name=&quot;decorators-file&quot; value=&quot;/WEB-INF/decorators.xml&quot; /&gt;
    &lt;excludes file=&quot;${decorators-file}&quot; /&gt;

    &lt;page-parsers&gt;
        &lt;parser content-type=&quot;text/html&quot;
            class=&quot;com.opensymphony.module.sitemesh.parser.HTMLPageParser&quot; /&gt;
        &lt;parser content-type=&quot;text/html;charset=ISO-8859-1&quot;
            class=&quot;com.opensymphony.module.sitemesh.parser.HTMLPageParser&quot; /&gt;
    &lt;/page-parsers&gt;

    &lt;decorator-mappers&gt;
        &lt;mapper class=&quot;com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper&quot;&gt;
            &lt;param name=&quot;config&quot; value=&quot;${decorators-file}&quot; /&gt;
        &lt;/mapper&gt;
    &lt;/decorator-mappers&gt;
&lt;/sitemesh&gt;
</pre>

			<li>Add the following to <b><code>[web-app]/WEB-INF/web.xml</code></b> within the <b><code>&lt;web-app&gt;</code></b> tag:</p>

<pre style="border: 1px solid #999999; padding: 5px">
&lt;filter&gt;
    &lt;filter-name&gt;<b>sitemesh</b>&lt;/filter-name&gt;
    &lt;filter-class&gt;<b>com.opensymphony.sitemesh.webapp.SiteMeshFilter</b>&lt;/filter-class&gt;
&lt;/filter&gt;

&lt;filter-mapping&gt;
    &lt;filter-name&gt;sitemesh&lt;/filter-name&gt;
    &lt;url-pattern&gt;<b>/*</b>&lt;/url-pattern&gt;
&lt;/filter-mapping&gt;
</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>