Skip to content
This repository
Browse code

Deleted sitemesh-docs from main source tree... moving it to a dedicat…

…ed sitemesh-website project
  • Loading branch information...
commit 45de21f004260b441088cf536f5f71dee99639c4 1 parent f52ac80
Joe Walnes authored January 20, 2010
3  BUILD.txt
@@ -16,13 +16,12 @@ You can also run mvn from a module directory to work just with that.
16 16
 The subdirectories in this package are modules. They are:
17 17
 
18 18
 * sitemesh : Main SiteMesh project
19  
-* sitemesh-docs: End-user documentation
20 19
 * sitemesh-examples-*: End user examples
21 20
 * sitemesh-tools-*: Tools used by SiteMesh development team
22 21
 
23 22
 === IDE instructions ===
24 23
 
25  
-IntelliJ 8: Create new project from existing structure (Maven), using pom.xml in sitemesh module.
  24
+IntelliJ 9: Create new project from existing structure (Maven), using pom.xml in sitemesh module.
26 25
 
27 26
 
28 27
 
2  package.sh
@@ -7,7 +7,7 @@
7 7
 POM_VERSION=3.0.0-SNAPSHOT
8 8
 RELEASE_VERSION=3.0-alpha-1
9 9
 
10  
-MODULES_TO_PACKAGE="sitemesh sitemesh-examples-* sitemesh-docs sitemesh-tools-benchmark"
  10
+MODULES_TO_PACKAGE="sitemesh sitemesh-examples-* sitemesh-tools-benchmark"
11 11
 
12 12
 mvn clean && mvn package
13 13
 
1  pom.xml
@@ -18,7 +18,6 @@
18 18
 
19 19
   <modules>
20 20
     <module>sitemesh</module>
21  
-    <module>sitemesh-docs</module>
22 21
     <module>sitemesh-tools-benchmark</module>
23 22
     <module>sitemesh-examples-hellowebapp</module>
24 23
   </modules>
4  sitemesh-docs/.gitignore
... ...
@@ -1,4 +0,0 @@
1  
-.classpath
2  
-.project
3  
-.settings
4  
-target/*
16  sitemesh-docs/README.txt
... ...
@@ -1,16 +0,0 @@
1  
-This is the SiteMesh documentation.
2  
-
3  
-Currently it exists as web-app, however as soon as SiteMesh offline support
4  
-has been implemented, it will also be a generated offline website included
5  
-in the SiteMesh documentation.
6  
-
7  
-To view:
8  
-  mvn package 
9  
-  mvn -Djetty.port=1234 jetty:run 
10  
-  Goto http://localhost:1234/sitemesh-docs/
11  
-
12  
-To publish the public site, you need Google AppEngine Java SDK installed and
13  
-a Google Account that is marked as a developer for the 'sitemesh-docs' AppEngine
14  
-project. 
15  
-  mvn package
16  
-  [app-engine-dir]/bin/appcfg.sh update target/sitemesh-docs
27  sitemesh-docs/pom.xml
... ...
@@ -1,27 +0,0 @@
1  
-<project>
2  
-  <modelVersion>4.0.0</modelVersion>
3  
-
4  
-  <parent>
5  
-    <artifactId>sitemesh-parent</artifactId>
6  
-    <groupId>org.sitemesh</groupId>
7  
-    <version>3.0.0-SNAPSHOT</version>
8  
-    <relativePath>../</relativePath>
9  
-  </parent>
10  
-
11  
-  <artifactId>sitemesh-docs</artifactId>
12  
-  <name>SiteMesh end-user documentation</name>
13  
-  <packaging>war</packaging>
14  
-
15  
-  <build>
16  
-    <finalName>sitemesh-docs</finalName>
17  
-  </build>
18  
-
19  
-  <dependencies>
20  
-    <dependency>
21  
-      <groupId>${project.groupId}</groupId>
22  
-      <artifactId>sitemesh</artifactId>
23  
-      <version>${project.version}</version>
24  
-    </dependency>
25  
-  </dependencies>
26  
-
27  
-</project>
17  sitemesh-docs/src/main/webapp/WEB-INF/appengine-web.xml
... ...
@@ -1,17 +0,0 @@
1  
-<!-- 
2  
-  This is a Google AppEngine configuration. 
3  
-  AppEngine is used to host the public SiteMesh docs at http://sitemesh-docs.appspot.com/ 
4  
-  See README.txt
5  
--->
6  
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
7  
-
8  
-  <application>sitemesh-docs</application>
9  
-
10  
-  <version>dev</version>
11  
-
12  
-  <!-- Don't treat any of the files as static - so Servlet engine (and SiteMesh) can handle them. -->
13  
-  <static-files> 
14  
-    <exclude path="**"/> 
15  
-  </static-files>
16  
-
17  
-</appengine-web-app>
3  sitemesh-docs/src/main/webapp/WEB-INF/sitemesh3.xml
... ...
@@ -1,3 +0,0 @@
1  
-<sitemesh>
2  
-  <mapping path="/*" decorator="/decorators/main.html"/>
3  
-</sitemesh>
19  sitemesh-docs/src/main/webapp/WEB-INF/web.xml
... ...
@@ -1,19 +0,0 @@
1  
-<?xml version="1.0" encoding="UTF-8"?>
2  
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
3  
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4  
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
5  
-         version="2.5"> 
6  
-
7  
-  <display-name>SiteMesh Documentation</display-name>
8  
-
9  
-  <filter>
10  
-    <filter-name>sitemesh</filter-name>
11  
-    <filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class>
12  
-  </filter>
13  
-
14  
-  <filter-mapping>
15  
-    <filter-name>sitemesh</filter-name>
16  
-    <url-pattern>/*</url-pattern>
17  
-  </filter-mapping>
18  
-
19  
-</web-app>
41  sitemesh-docs/src/main/webapp/ant-examples/build.xml
... ...
@@ -1,41 +0,0 @@
1  
-<project name="ant-examples">
2  
-
3  
-    <taskdef name="sitemesh"
4  
-             classname="org.sitemesh.ant.SiteMeshTask"
5  
-             classpath="path/to/sitemesh-3.x.jar"/>
6  
-
7  
-    <target name="generate-basic-documentation"
8  
-            description="Generate static content with the company look and feel.">
9  
-        <sitemesh srcdir="documentation"
10  
-                  config="config/sitemesh.xml"
11  
-                  destdir="site/documentation"
12  
-                  includes="**/*.html"
13  
-                  excludes="decorators/*"/>
14  
-    </target>
15  
-
16  
-    <target name="generate-advance-documentation"
17  
-            description="Generate static content with the company look and feel that isn't private.">
18  
-        <sitemesh destdir="site/documentation"
19  
-                  config="config/sitemesh.xml">
20  
-            <sitemeshfileset dir="documentation">
21  
-                <include name="**/*.html"/>
22  
-                <exclude name="private/*"/>
23  
-            </sitemeshfileset>
24  
-
25  
-            <sitemeshfileset dir="presentation">
26  
-                <include name="**/*.html"/>
27  
-            </sitemeshfileset>
28  
-        </sitemesh>
29  
-    </target>
30  
-
31  
-    <target name="generate-with-custom-decorator"
32  
-            description="Generate static content that's internal to the company.">
33  
-        <sitemesh destdir="site/documentation">
34  
-            <sitemeshfileset dir="documentation"
35  
-                             decorator="decorators/private.html">
36  
-                <include name="private/*.html"/>
37  
-            </sitemeshfileset>
38  
-        </sitemesh>
39  
-    </target>
40  
-
41  
-</project>
170  sitemesh-docs/src/main/webapp/configuration.html
... ...
@@ -1,170 +0,0 @@
1  
-<html>
2  
-	<head>
3  
-		<title>Configuring SiteMesh</title>
4  
-	</head>
5  
-	<body>
6  
-	
7  
-		<p>SiteMesh supports two main approaches to configurations - <b>XML</b> or <b>Java</b>. It's up to you which you use. In fact, you can even use them both.</p>
8  
-		
9  
-		<table class="definitionTable">
10  
-			<tr>
11  
-				<th>XML</th>
12  
-				<th>Java</th>
13  
-			</tr>
14  
-			<tr>
15  
-				<td>
16  
-					<ul>
17  
-						<li>Simplest to get started with</li>
18  
-						<li>Automatically reloads when config file changes</li>
19  
-						<li>Does not require Java programming</li>
20  
-					</ul>
21  
-				</td>
22  
-				<td>
23  
-					<ul>
24  
-						<li>Allows for greater customization of SiteMesh</li>
25  
-						<li>Avoids yet another configuration file</li>
26  
-						<li>Can be used from higher level languages such as JRuby, Groovy, Scala...</li>
27  
-					</ul>
28  
-				</td>
29  
-			</tr>
30  
-		</table>
31  
-
32  
-		<h2>XML based configuration</h2>
33  
-		
34  
-		<p>The configuration file should live in <code><b>/WEB-INF/sitemesh3.xml</b></code> in your web-application.</p>
35  
-		
36  
-		<h4>Example</h4>
37  
-		<pre class='code'>&lt;sitemesh&gt;
38  
-  &lt;mapping path="<b>/*</b>" decorator="<b>/decorator.html</b>"/&gt;
39  
-  &lt;mapping path="<b>/admin/*</b>" decorator="<b>/admin-decorator.html</b>"/&gt;
40  
-&lt;/sitemesh&gt;</pre>
41  
-		
42  
-		<h2>Java based configuration</h2>
43  
-		
44  
-		<p>To use the Java based configuration, subclass <code><b>org.sitemesh.config.ConfigurableSiteMeshFilter</b></code>
45  
-		and overload the <code><b>applyCustomConfiguration(SiteMeshFilterBuilder builder)</b></code> method.
46  
-		You shall be passed an object that you can use to configure SiteMesh. You then deploy this filter in to your web-application.</p>
47  
-		
48  
-		<h4>Example</h4>
49  
-		<pre class='code'>public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {
50  
-  @Override
51  
-  protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
52  
-    <b>builder.addDecoratorPath("/*", "/decorator.html")
53  
-           .addDecoratorPath("/admin/*", "/admin/decorator.html");</b>
54  
-  }
55  
-}</pre>
56  
-
57  
-		<p><b>Note:</b> The <code><b>SiteMeshFilterBuilder</b></code> class supports a chainable API where each method returns an instance of itself. This is a convenience, but you
58  
-		don't have to use this style.</p>
59  
-
60  
-		<p><b>Note:</b> If you also have an XML config file, SiteMesh will load this before calling <code>applyCustomConfiguration()</code>. 
61  
-		This allows you to use XML for some configuration and Java for more advanced aspects.</p>
62  
-
63  
-
64  
-		
65  
-		<h2>Configuring Decorator Mappings</h2>
66  
-		
67  
-		<p>This is the most common configuration applied to SiteMesh - mapping which decorators are applied based on the paths.</p>
68  
-		
69  
-		<p>Things you can do:</p>
70  
-		<ul>
71  
-			<li>Map a default decorator to all paths</li>
72  
-			<li>Map a decorator to a specific path</li>
73  
-			<li>Map multiple decorators to a path - each decorator is applied to the result of the previous</li>
74  
-			<li>Exclude a path from being decorated</li>
75  
-		</ul>
76  
-		
77  
-		<h4>XML</h4>
78  
-		<pre class="code">&lt;sitemesh&gt;
79  
-
80  
-  &lt;!-- Map default decorator. This shall be applied to all paths if no other paths match. --&gt;
81  
-  <b>&lt;mapping decorator="/default-decorator.html"/&gt;</b>
82  
-
83  
-  &lt;!-- Map decorators to path patterns. --&gt;
84  
-  <b>&lt;mapping path="/admin/*" decorator="/another-decorator.html"/&gt;</b>
85  
-  <b>&lt;mapping path="/*.special.jsp" decorator="/special-decorator.html"/&gt;</b>
86  
-
87  
-  &lt;!-- Alternative convention. This is more verbose but allows multiple decorators 
88  
-       to be applied to a single path. --&gt;
89  
-  <b>&lt;mapping&gt;
90  
-    &lt;path&gt;/articles/*&lt;/path&gt;
91  
-    &lt;decorator&gt;/decorators/article.html&lt;/decorator&gt;
92  
-    &lt;decorator&gt;/decorators/two-page-layout.html&lt;/decorator&gt;
93  
-    &lt;decorator&gt;/decorators/common.html&lt;/decorator&gt;
94  
-  &lt;/mapping&gt;</b>
95  
-
96  
-  &lt;!-- Exclude path from decoration. --&gt;
97  
-  <b>&lt;mapping path="/javadoc/*" exclue="true"/&gt;</b>
98  
-  <b>&lt;mapping path="/brochures/*" exclue="true"/&gt;</b>
99  
-
100  
-&lt;/sitemesh&gt;</pre>
101  
-
102  
-		<h4>Java</h4>
103  
-		<pre class='code'>public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {
104  
-  @Override
105  
-  protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
106  
-            // Map default decorator. This shall be applied to all paths if no other paths match.
107  
-    <b>builder.addDecoratorPath("/*", "/default-decorator.html")</b>
108  
-           // Map decorators to path patterns.
109  
-           <b>.addDecoratorPath("/admin/*", "/another-decorator.html")</b>
110  
-           <b>.addDecoratorPath("/*.special.jsp", "/special-decorator.html")</b>
111  
-           // Map multiple decorators to the a single path.
112  
-           <b>.addDecoratorPaths("/articles/*", "/decorators/article.html", 
113  
-                                             "/decoratos/two-page-layout.html", 
114  
-                                             "/decorators/common.html")</b>
115  
-           // Exclude path from decoration.
116  
-           <b>.addExcludedPath("/javadoc/*")</b>
117  
-           <b>.addExcludedPath("/brochures/*")</b>;
118  
-  }
119  
-}</pre>
120  
-
121  
-		<h2>Advanced Configuration</h2>
122  
-		
123  
-		<p>For most users, the decorator mappings above should be enough. But if you want more options...</p>
124  
-		
125  
-		<h3>MIME Types</h3>
126  
-
127  
-		<p>By default, SiteMesh will only intercept responses that set the <b><code>Content-Type</code></b> HTTP header to <b><code>text/html</code></b>.</p>
128  
-		
129  
-		<p>This can be altered to allow SiteMesh to intercept responses for other types. This is only applicable for the SiteMesh Filter - it is ignored by the offline site builder.</p>
130  
-		
131  
-		<h4>XML</h4>
132  
-		<pre class="code">&lt;sitemesh&gt;
133  
-  <b>&lt;mime-type&gt;text/html&lt;/mime-type&gt;
134  
-  &lt;mime-type&gt;application/vnd.wap.xhtml+xml&lt;/mime-type&gt;
135  
-  &lt;mime-type&gt;application/xhtml+xml&lt;/mime-type&gt;</b>
136  
-  ...
137  
-&lt;/sitemesh&gt;</pre>
138  
-
139  
-		<h4>Java</h4>
140  
-		<pre class='code'>public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {
141  
-  @Override
142  
-  protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
143  
-    <b>builder.setMimeTypes("text/html", "application/xhtml+xml", "application/vnd.wap.xhtml+xml")</b>;
144  
-  }
145  
-}</pre>
146  
-
147  
-		<h3>Deploying Tag Rule Bundles</h3>
148  
-		
149  
-		<p>An advanced feature of SiteMesh is the ability to define custom rules that manipulate tags on a page. 
150  
-		These are classes that implement <code>org.sitemesh.content.tagrules.TagRuleBundle</code>.</p>
151  
-		
152  
-		<h4>XML</h4>
153  
-		<pre class="code">&lt;sitemesh&gt;
154  
-  <b>&lt;content-processor&gt;
155  
-    &lt;tag-rule-bundle class="com.something.CssCompressingBundle"/&gt;
156  
-    &lt;tag-rule-bundle class="com.something.LinkRewritingBundle"/&gt;
157  
-  &lt;/content-processor&gt;</b>
158  
-  ...
159  
-&lt;/sitemesh&gt;</pre>
160  
-
161  
-		<h4>Java</h4>
162  
-		<pre class='code'>public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {
163  
-  @Override
164  
-  protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
165  
-    <b>builder.addTagRuleBundles(new CssCompressingBundle(), new LinkRewritingBundle())</b>;
166  
-  }
167  
-}</pre>
168  
-
169  
-	</body>
170  
-</html>
BIN  sitemesh-docs/src/main/webapp/decorators/background.png
149  sitemesh-docs/src/main/webapp/decorators/main.html
... ...
@@ -1,149 +0,0 @@
1  
-<html>
2  
-  <head>
3  
-    <title><sitemesh:write property='title'>SiteMesh3 documentation</sitemesh:write></title>
4  
-    <style type='text/css'>
5  
-    
6  
-      /* Shared style */
7  
-      body {
8  
-        font-family: "Trebuchet MS", verdana, arial, sans-serif;
9  
-        font-size: 12px;
10  
-        background: #cacaca url('decorators/background.png') repeat-x scroll 0 0;
11  
-        padding: 0;
12  
-      }
13  
-      pre {
14  
-        background-color: #eeeeee;
15  
-        border: 1px solid #aaaaaa;
16  
-        padding: 4px;
17  
-        margin: 20px;
18  
-        overflow: auto;
19  
-      }
20  
-      .definitionTable {
21  
-        margin: 10px 20px 10px 20px;
22  
-        border-collapse: collapse;
23  
-      }
24  
-      .definitionTable th {
25  
-        border: 1px solid #cccccc;
26  
-        background-color: #eeeeee;
27  
-        font-weight: bold;
28  
-        text-align: left;
29  
-      }
30  
-      .definitionTable td {
31  
-        border: 1px solid #cccccc;
32  
-        padding: 3px;
33  
-        font-size: 12px;
34  
-      }
35  
-
36  
-      /* Decorator layout */
37  
-      #layoutContainer {
38  
-        width: 800px;
39  
-        border: 1px solid #aaaaaa;
40  
-        margin: 0 auto;
41  
-        padding: 4px 0 0 4px;
42  
-        background-color: #cccccc;
43  
-      }
44  
-      .layoutSection {
45  
-        border: 1px solid #aaaaaa;
46  
-        background-color: #ffffff;
47  
-        margin: 0 4px 4px 0;
48  
-        padding: 10px;
49  
-      }
50  
-
51  
-      /* Top links */
52  
-      #topLinks {
53  
-        text-align: right;
54  
-      }
55  
-
56  
-      #topLinks a {
57  
-        padding: 0.5em;
58  
-        display: inline-block;
59  
-        margin: 0;
60  
-        font-size: 110%;
61  
-      }
62  
-
63  
-      #topLinks a:hover {
64  
-        background-color: #f9f9f9;
65  
-      }
66  
-
67  
-      #topLinks a.selected {
68  
-        background-color: #fb9d2c;
69  
-        color: #ffffff;
70  
-      }
71  
-
72  
-      /* Curve the corners of the page to match the logo. Works on FireFox/Safari/Chrome, but not IE/Opera (though degrades nicely). */
73  
-      #layoutContainer {
74  
-        border-radius: 15px;
75  
-        -moz-border-radius: 15px;
76  
-        -webkit-border-radius: 15px;
77  
-      }
78  
-      .layoutSection:first-child {
79  
-        border-top-left-radius: 10px;
80  
-        border-top-right-radius: 10px;
81  
-        -moz-border-radius-topleft: 10px;
82  
-        -moz-border-radius-topright: 10px;
83  
-        -webkit-border-top-left-radius: 10px;
84  
-        -webkit-border-top-right-radius: 10px;
85  
-      }
86  
-      .layoutSection:last-child {
87  
-        border-bottom-left-radius: 10px;
88  
-        border-bottom-right-radius: 10px;
89  
-        -moz-border-radius-bottomleft: 10px;
90  
-        -moz-border-radius-bottomright: 10px;
91  
-        -webkit-border-bottom-left-radius: 10px;
92  
-        -webkit-border-bottom-right-radius: 10px;
93  
-      }
94  
- 
95  
-    </style>
96  
-    <sitemesh:write property='head'/>
97  
-  </head>
98  
-  <body>
99  
-    <div id='layoutContainer'>
100  
-      <div class='layoutSection'>
101  
-        <a href="index.html" title="Return to SiteMesh homepage"><img src='decorators/sitemesh-logo.gif' width='330' height='82' alt='SiteMesh 3' border='0' style='float: left; padding-right: 20px'/></a>
102  
-        <div id="topLinks">
103  
-          <a href="overview.html" title="Learn about what SiteMesh is, why it's useful, and how it can help you">Overview</a>
104  
-          <a href="http://github.com/sitemesh/sitemesh3/downloads" target="external" title="Download the latest version of the SiteMesh library, examples and documentation">Download</a>
105  
-          <a class="selected" href="index.html" title="Browse the SiteMesh user manual">Documentation</a>
106  
-          <a href="http://groups.google.com/group/sitemesh3-users" target="external"  title="Get help, and discuss SiteMesh with other users">Discuss</a>
107  
-          <a href="http://dev.sitemesh.org/" target="external"  title="Get involved in the SiteMesh project - suggest features, report issues, contribute changes...">Contribute</a>
108  
-        </div>
109  
-        <p id="linkTitle">
110  
-           <div class="warning" style="border: 1px solid #cccccc; background-color: #ffeeee; padding: 1px; margin: 2px 2px 2px 350px;">
111  
-             SiteMesh 3 is <b>ALPHA</b> quality - not even BETA yet. There's lots missing.<br/>
112  
-	     If you are looking for a stable version, try <a href="http://www.opensymphony.com/sitemesh/">SiteMesh 2</a> instead.
113  
-           </div>
114  
-        </p>
115  
-        <span style='clear:left'></span>
116  
-      </div>
117  
-      <div class='layoutSection' style='background-color: white; text-align: justify;'>
118  
-        <h1 style='margin: 0;'><sitemesh:write property='title'/></h1>
119  
-
120  
-        <sitemesh:write property='body'>
121  
-          <h1>Here is a title</h1>
122  
-          <p>Main body goes here.<p>
123  
-          <p>Blah de blah blah blah blah blah blah de blah blah blah blah blah blah de blah blah blah blah blah blah.
124  
-          Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. 
125  
-          Blah de blah blah blah blah blah blah de blah blah blah blah blah blah de blah blah blah blah blah blah.
126  
-          Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. </p>	  
127  
-        </sitemesh:write>
128  
-
129  
-      </div>
130  
-      <div class='layoutSection' style='text-align: center'>
131  
-        &copy; 1999-2009 <a href="http://www.sitemesh.org/">sitemesh.org</a> - This site built with SiteMesh (of course)
132  
-      </div>
133  
-    </div>
134  
-
135  
-    <!-- Google Analytics -->
136  
-    <script type="text/javascript">
137  
-      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
138  
-      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
139  
-    </script>
140  
-    <script type="text/javascript">
141  
-    try {
142  
-      var pageTracker = _gat._getTracker("UA-110973-3");
143  
-      pageTracker._setDomainName(".sitemesh.org"); // Track across all *.sitemesh.org subdomains.
144  
-      pageTracker._trackPageview();
145  
-    } catch(err) {}
146  
-    </script>
147  
-
148  
-  </body>
149  
-</html>
BIN  sitemesh-docs/src/main/webapp/decorators/sitemesh-logo.gif
222  sitemesh-docs/src/main/webapp/getting-started.html
... ...
@@ -1,222 +0,0 @@
1  
-<html>  
2  
-  <head>
3  
-    <title>Getting started with SiteMesh3</title>
4  
-    <meta name='author' content='Joe Walnes'>
5  
-    <style type='text/css'>
6  
-      .decorator { color: #000099; }
7  
-      .content { color: #990000; }
8  
-    </style> 
9  
-  </head>
10  
-  <body>
11  
-
12  
-    <h2>Introduction</h2>
13  
-
14  
-    <p>This tutorial is a quick introduction to using SiteMesh3 in a web-application. It covers:</p>
15  
-    <ul>
16  
-      <li>A high level overview of how SiteMesh3 works</li>
17  
-      <li>Installation and configuration</li>
18  
-      <li>Building and applying a simple decorator</li>
19  
-    </ul>
20  
-
21  
-    <p>It is recommend you read the high level <a href="overview.html">SiteMesh Overview</a> before this tutorial.</p>
22  
-
23  
-    <h2>SiteMesh in web applications</h2>
24  
-
25  
-    <p>In a web application, SiteMesh acts as a Servler Filter. It allows requests to be handled by the Servlet engine as normal, 
26  
-    but the resulting HTML (referred to as the <b>content</b>) will be intercepted before being returned to the browser.</p>
27  
-    
28  
-    <p>The intercepted content has certain properties extracted (typically the contents of the
29  
-    <code>&lt;title&gt;</code>, <code>&lt;head&gt;</code> and <code>&lt;body&gt;</code> tags and is then passed on to a
30  
-    second request that should return the common look and feel for the site (referred to as the <b>decorator</b>). The decorator
31  
-    contains placeholders for where the properties extracted from the content should be inserted.</p>
32  
-    
33  
-    <p>Under the hood, a key component of the SiteMesh architecture is the <b>content processor</b>. This is an efficient engine
34  
-    for transforming and extracting content from HTML content. For most users, it's fine to use it as it comes, but it is also possible
35  
-    to define your own transformation and extraction rules.</p>
36  
-    
37  
-    <p>SiteMesh does not care what technologies are used to generate the content or the decorator. They may be
38  
-    static files, Servlet, JSPs, other filters, MVC frameworks, etc. So long as it's served by the Servlet engine, SiteMesh can
39  
-    work with it.</p>
40  
-    
41  
-    <h2>Dependencies</h2>
42  
-    
43  
-    <p>Running SiteMesh3 requires at least:</p>
44  
-    <ul>
45  
-      <li>JDK 1.5</li>
46  
-      <li>A Servlet 2.5 compliant container</li>
47  
-      <li>The SiteMesh runtime library</li>
48  
-    </ul>
49  
-    
50  
-    <p>The SiteMesh library should be <a href="http://github.com/sitemesh/sitemesh3/downloads" target="external">downloaded</a> and placed in <code><b>/WEB-INF/lib/</b></code>.</p>
51  
-
52  
-    <h2>Setup</h2>
53  
-    
54  
-    <p>Insert the SiteMesh Filter in <code><b>/WEB-INF/web.xml</b></code>:</p>
55  
-<pre class='code'>&lt;web-app&gt;
56  
-
57  
-  ...
58  
- 
59  
-  &lt;filter&gt;
60  
-    &lt;filter-name&gt;<b>sitemesh</b>&lt;/filter-name&gt;
61  
-    &lt;filter-class&gt;<b>org.sitemesh.config.ConfigurableSiteMeshFilter</b>&lt;/filter-class&gt;
62  
-  &lt;/filter&gt;
63  
-
64  
-  &lt;filter-mapping&gt;
65  
-    &lt;filter-name&gt;<b>sitemesh</b>&lt;/filter-name&gt;
66  
-    &lt;url-pattern&gt;<b>/*</b>&lt;/url-pattern&gt;
67  
-  &lt;/filter-mapping&gt;
68  
-
69  
-&lt;/web-app&gt;</pre>
70  
-
71  
-    <p>Deploy the web-application to your Servlet container. From this point onwards, this tutorial assumes the web-app is running at <code><b>http://myserver/</b></code>.
72  
-    
73  
-    <h2>Creating a decorator</h2>
74  
-    
75  
-    <p>The <b>decorator</b> contains the common layout and style that should be applied to the pages in the web application. 
76  
-    It is a template that contains place holders for the content's <code>&lt;title&gt;</code>, <code>&lt;head&gt;</code> and
77  
-    <code>&lt;body&gt;</code> elements.</p>
78  
-
79  
-    <p>At the bare minimum, it should contain:</p>
80  
-
81  
-    <pre class='code decorator'>&lt;html&gt;
82  
-  &lt;head&gt;
83  
-    &lt;title&gt;<b>&lt;sitemesh:write property='title'/&gt;</b>&lt;/title&gt;
84  
-    <b>&lt;sitemesh:write property='head'/&gt;</b>
85  
-  &lt;/head&gt;
86  
-  &lt;body&gt;
87  
-    <b>&lt;sitemesh:write property='body'/&gt;</b>
88  
-  &lt;/body&gt;
89  
-&lt;/html&gt;</pre>
90  
-
91  
-    <p>The <code><b>&lt;sitemesh:write property='...'/&gt;</b></code> tag will be rewritten by SiteMesh to include properties extracted from 
92  
-    the content. There are more properties that can be extracted from the content and it's possible to define your own rules - that will
93  
-    be covered in another tutorial.</p>
94  
-
95  
-    <p>The bare minimum decorator isn't very useful. Let's add some style and a bit of common layout.</p>
96  
-    
97  
-    <p>Create the file <code><b>/decorator.html</b></code> in your web-app, containing:</p>
98  
-
99  
-    <pre class='code decorator'>&lt;html&gt;
100  
-  &lt;head&gt;
101  
-    &lt;title&gt;SiteMesh example: <b>&lt;sitemesh:write property='title'/&gt;</b>&lt;/title&gt;
102  
-    &lt;style type='text/css'&gt;
103  
-      /* Some CSS */
104  
-      body { font-family: arial, sans-serif; background-color: #ffffcc; }
105  
-      h1, h2, h3, h4 { text-align: center; background-color: #ccffcc; border-top: 1px solid #66ff66; }
106  
-      .mainBody { padding: 10px; border: 1px solid #555555; }
107  
-      .disclaimer { text-align: center; border-top: 1px solid #cccccc; margin-top: 40px; color: #666666; font-size: smaller; }
108  
-    &lt;/style&gt;
109  
-    <b>&lt;sitemesh:write property='head'/&gt;</b>
110  
-  &lt;/head&gt;
111  
-  &lt;body&gt;
112  
-
113  
-    &lt;h1 class='title'&gt;SiteMesh example site: <b>&lt;sitemesh:write property='title'/&gt;</b>&lt;/h1&gt;
114  
-
115  
-    &lt;div class='mainBody'&gt;
116  
-      <b>&lt;sitemesh:write property='body'/&gt;</b>
117  
-    &lt;/div&gt;
118  
-
119  
-    &lt;div class='disclaimer'&gt;Site disclaimer. This is an example.&lt;/div&gt;
120  
-
121  
-  &lt;/body&gt;
122  
-&lt;/html&gt;</pre>
123  
-
124  
-    <p>In this example, the decorator is a static <code>.html</code> file, but if you want the decorator to be more dynamic, technologies such as JSP, FreeMarker, etc can be used. 
125  
-    SiteMesh doesn't care - it just needs a path that can be served content by the Servlet engine.</p>
126  
-
127  
-    <h2>Configuration</h2>
128  
-
129  
-    <p>SiteMesh needs to be configured to know about this decorator and what it should do with it.</p>
130  
-
131  
-    <p>The configuration file should be created at  <code><b>/WEB-INF/sitemesh3.xml</b></code>:</p>
132  
-<pre class='code'>&lt;sitemesh&gt;
133  
-  &lt;mapping path="<b>/*</b>" decorator="<b>/decorator.html</b>"/&gt;
134  
-&lt;/sitemesh&gt;</pre>
135  
-
136  
-    <p>This tells SiteMesh that requests matching the path <code>/*</code> (i.e. all requests) should be decorated with <code>/decorator.html</code> that we just created.</p>
137  
-
138  
-    <p><i>If you don't like the idea of having to use XML to configure SiteMesh, don't worry - there are alternative mechanisms including 
139  
-    directly in <code>WEB-INF/web.xml</code>, programatically through a Java API, through Spring, by naming convention, or any custom way you may choose to plug in. 
140  
-    These are explained further in <a href="configuration.html">another article</a>.</i></p>
141  
-    
142  
-    <h2>Creating some content</h2>
143  
-
144  
-    <p>Now to create some content. This is defined in plain HTML content. Create <code><b>/hello.html</b></code>:</p>
145  
-
146  
-    <pre class='code content'>&lt;html&gt;
147  
-  &lt;head&gt;
148  
-    &lt;title&gt;<b>Hello World</b>&lt;/title&gt;
149  
-    <b>&lt;meta name='description' content='A simple page'&gt;</b>
150  
-  &lt;/head&gt;
151  
-  &lt;body&gt;
152  
-    <b>&lt;p&gt;Hello &lt;strong&gt;world&lt;/strong&gt;!&lt;/p&gt;</b>
153  
-  &lt;/body&gt;
154  
-&lt;/html&gt;</pre>
155  
-
156  
-    <p>Like the decorator, the content may be static files or dynamically generated by the Servlet engine (e.g. JSP).</p>
157  
-
158  
-    <h2>The result</h2>
159  
-    
160  
-    <p>Pointing your browser to <code><b>http://myserver/hello.html</b></code> will serve the content you just created, with the
161  
-    decorator applied. The resulting merged HTML will look like this:</p>
162  
-
163  
-    <pre class='code decorator'>&lt;html&gt;
164  
-  &lt;head&gt;
165  
-    &lt;title&gt;SiteMesh example: <b class='content'>Hello World</b>&lt;/title&gt;
166  
-    &lt;style type='text/css'&gt;
167  
-      /* Some CSS */
168  
-      body { font-family: arial, sans-serif; background-color: #ffffcc; }
169  
-      h1, h2, h3, h4 { text-align: center; background-color: #ccffcc; border-top: 1px solid #66ff66; }
170  
-      .mainBody { padding: 10px; border: 1px solid #555555; }
171  
-      .disclaimer { text-align: center; border-top: 1px solid #cccccc; margin-top: 40px; color: #666666; font-size: smaller; }
172  
-    &lt;/style&gt;
173  
-    <b class='content'>&lt;meta name='description' content='A simple page'&gt;</b>
174  
-  &lt;/head&gt;
175  
-  &lt;body&gt;
176  
-
177  
-    &lt;h1 class='title'&gt;SiteMesh example site: <b class='content'>Hello World</b>&lt;/h1&gt;
178  
-
179  
-    &lt;div class='mainBody'&gt;
180  
-      <b class='content'>&lt;p&gt;Hello &lt;strong&gt;world&lt;/strong&gt;!&lt;/p&gt;</b>
181  
-    &lt;/div&gt;
182  
-
183  
-    &lt;div class='disclaimer'&gt;Site disclaimer. This is an example.&lt;/div&gt;
184  
-
185  
-  &lt;/body&gt;
186  
-&lt;/html&gt;</pre>
187  
-
188  
-    <p>As you can see, the <code>&lt;title&gt;</code>, <code>&lt;head&gt;</code> and <code>&lt;body&gt;</code> have
189  
-    been extracted from the content and inserted into the decorator template.</p>
190  
-    
191  
-    <h2>Summary</h2>
192  
-
193  
-    <p>A quick recap:</p>
194  
-    <ul>
195  
-      <li>SiteMesh is installed by dropping the library jar in <code><b>/WEB-INF/lib</b></code> and creating a filter (with mapping) in <code><b>/WEB-INF/web.xml</b></code></li>
196  
-      <li>It can be configured by creating a <code><b>/WEB-INF/sitemesh3.xml</b></code> file, or through <a href="configuration.html">other configuration methods</a></li>
197  
-      <li>The filter intercepts requests to <b>Content</b>, runs it through the <b>Content Processor</b> and merges with a <b>Decorator</b>
198  
-      <li>The <b>Content</b> is defined by an HTML page, that contains the vanilla HTML content of the site</li>
199  
-      <li>The <b>Decorator</b> is also defined by an HTML page, that contains the look and feel of the site, and placeholder <code><b>&lt;sitemesh:write&gt;</b></code> tags to indicate where the <b>Content</b> should be merged in</li>
200  
-      <li>The <b>Content Processor</b> contains the rules for extracting and transforming the content - it has some simple default rules and can be customized</li>
201  
-    </ul>
202  
-    
203  
-    <!--
204  
-    <h2>Learn more</h2>
205  
-
206  
-    <p>This tutorial skipped over many of the features of SiteMesh. You have enough information to start using SiteMesh, but if you want to learn more...</p>
207  
-
208  
-    <ul>
209  
-      <li><a href="overview.html">SiteMesh overview</a></li>
210  
-      <li><a href="configuration.html">Configuring SiteMesh</a></li>
211  
-      <li><a href="inline.html">Decorating inline page fragments</a></li>
212  
-      <li><a href="chaining.html">Chaining decorators</a></li>
213  
-      <li><a href="composition.html">Page composition</a></li>
214  
-      <li><a href="content-processor.html">Content processor and tag reference</a></li>
215  
-      <li><a href="offline.html">Building offline websites</a></li>
216  
-      <li><a href="examples/index.html">Browse examples</a></li>
217  
-      <li><a href="cookbook/index.html">SiteMesh cookbook</a></li>
218  
-    </ul>
219  
-    -->
220  
-
221  
-  </body>
222  
-</html>
27  sitemesh-docs/src/main/webapp/index.html
... ...
@@ -1,27 +0,0 @@
1  
-<html>  
2  
-  <head>
3  
-    <title>SiteMesh3 Documentation</title>
4  
-    <meta name='author' content='Joe Walnes'>
5  
-  </head>
6  
-  <body>
7  
-
8  
-    <h2>Articles</h2>
9  
-    <ul>
10  
-      <li><a href="overview.html">SiteMesh overview</a></li>
11  
-      <li><a href="new-in-sitemesh3.html">What's new in SiteMesh 3?</a></li>
12  
-      <li><a href="getting-started.html">Getting started</li>
13  
-      <li><a href="configuration.html">Configuring SiteMesh</a></li>
14  
-      <li><a href="offline.html">Building offline websites</a></li>
15  
-    </ul>
16  
-
17  
-    <!--
18  
-    <h2>Building sites</h2>
19  
-    <ul>
20  
-      <li><a href="inline.html">Decorating inline page fragments</a></li>
21  
-      <li><a href="chaining.html">Chaining decorators</a></li>
22  
-      <li><a href="composition.html">Page composition</a></li>
23  
-    </ul>
24  
-    -->
25  
-    
26  
-  </body>
27  
-</html>
47  sitemesh-docs/src/main/webapp/new-in-sitemesh3.html
... ...
@@ -1,47 +0,0 @@
1  
- <html>
2  
-	<head>
3  
-		<title>What's new in SiteMesh 3?</title>
4  
-	</head>
5  
-	<body>
6  
-	
7  
-		<p>SiteMesh 3 has been completely rebuilt from the ground up. It's more efficient, easier to use and extensible. While the code is new, it still holds the same
8  
-		values of SiteMesh 2, namely simplicity, robustness and performance.</p>
9  
-		
10  
-		<h2>New Content Processor Architecture</h2>
11  
-		<p>The internals of how SiteMesh processes content have been radically changed. The result is typically a 3X gain in throughput and half the memory usage (based on some typical sized samples).</p>
12  
-		<p>The new architecture also opens up new possibilities for upcoming features...</p>
13  
-		
14  
-		<h2>Decorator Chaining</h2>
15  
-		<p>Decorators can now be chained together in a website. That is, content can be decorated, then decorated again (and again). 
16  
-		The new architecture of the content processor means there is little overhead in applying multiple decorators.</p>
17  
-		<!--For example: mypage.html -> two-column-decorator.html -> common-look-and-feel-decorator.html-->
18  
-		
19  
-		<h2>No Tie-ins to Templating Systems</h2>
20  
-		<p>No longer do you need to commit to JSP or Velocity to build your decorators. Like content, decorators can be generated by any technology - even static .html files.</p>
21  
-
22  
-		<h2>Simplified Configuration</h2>
23  
-		<p>Want to configure purely through Java code, through XML, through Spring, or maybe by convention? It's your choice. 
24  
-		And it's easy to plug in your own configuration mechanism.</p>
25  
-
26  
-		<h2>Offline Site Generation</h2>
27  
-		<p>SiteMesh comes with tools to allow you decorators to content for static websites as an offline task. This can be invoked from a command line tool, an Ant task or through a Java API.</p>
28  
-		<p>Can be used to cut the cost of hosting (no Java runtime needed on servers) or simplify distribution (e.g. include web-site as part of a downloaded package).</p>
29  
-
30  
-		<h2>Code Modernization</h2>
31  
-		<p>Under the hood, over 10 years worth of cruft has been cleaned up. This means a simpler API. And many long-standing design 
32  
-		decisions have been revisited, which has made the things above possible, and opens the possibility of your own extensions.</p>
33  
-		<p>The various extension APIs have been revisited to make the easier to understand, with useful hooks and clear documentation.</p>
34  
-		
35  
-		<h2>Reusable Core Building Blocks</h2>
36  
-		<p>Many of the underlying building blocks of SiteMesh are useful to other applications. These have been decoupled from the code, allowing you to
37  
-		reuse them in your own application, even if you don't intend to use SiteMesh.</p>
38  
-		<ul>
39  
-			<li>The ContentBufferingFilter is a reusable Servlet Filter that intercepts responses and allows modifications to be made to the content.</li>
40  
-			<li>The HTML TagProcessor is a high-performant and extensible tag parser that allows for extraction and transformations of content.</li>
41  
-		</ul>
42  
-
43  
-		<h2>Relicensed under the Apache Software License v2.0</h2>
44  
-		<p>This license is used much more widely and approved by many organizations.</p>
45  
-
46  
-	</body>
47  
-</html>
196  sitemesh-docs/src/main/webapp/offline.html
... ...
@@ -1,196 +0,0 @@
1  
-<html>
2  
-	<head>
3  
-		<title>Building offline websites with SiteMesh</title>
4  
-        <style>
5  
-            .attribute{
6  
-                color: blue;
7  
-                font-weight: bold;
8  
-            }
9  
-            .node {
10  
-                color: #330099;
11  
-                font-weight: bold;
12  
-            }
13  
-        </style>
14  
-	</head>
15  
-	<body>
16  
-	
17  
-		<p>A new feature in SiteMesh 3 is being able to apply decorators to content as an offline task, typically as part of a build step.</p>
18  
-		
19  
-		<p>If both your content and your decorators are static, this offers a few benefits:</p>
20  
-		<ul>
21  
-			<li>Allows final content to be distributed as pre-generated folder. Useful for including documentation with products without having to include a full Servlet compliant web-server.</li>
22  
-			<li>Cuts down server loads - most web-server architectures are optimized for serving static files.</li>
23  
-			<li>Provides more flexibility on where you can host content.</li>
24  
-		</ul>
25  
-		
26  
-		<p>It's also possible to reuse decorators and configuration between a web application that generates decorated content on the fly,
27  
-		and offline generated files.</p>
28  
-		
29  
-		<h2>Usage</h2>
30  
-
31  
-		<p>There are a few different approaches to invoking the SiteMesh offline generator:</p>
32  
-		<ol>
33  
-			<li><b>Command line interface</b></li>
34  
-			<li><b><a href="http://ant.apache.org/" target="external">Apache Ant</a> task</b></li>
35  
-			<li><b>Java API</b> (this can be embedded in applications, or used from higher level languages such as JRuby, Groovy or Scala)</li>
36  
-		</ol>
37  
-		
38  
-		<p>Each of these can have the mappings of the decorators passed directly to them, or load from the SiteMesh <a href="configuration.html">configuration file</a>.</p>
39  
-
40  
-		<p>Use the approach that suits your project.</p>
41  
-		
42  
-		<h2>Command line interface</h2>
43  
-		
44  
-		<p>You can invoke the command line interface by running the executable sitemesh.jar. It requires Java 5 but no other dependencies.</p>
45  
-		
46  
-		<p>Invoking on it's own will output a detailed help message:</p>
47  
-		
48  
-		<pre class="code"><b>java -jar sitemesh-3.x.jar</b></pre>
49  
-		
50  
-		<h4>Arguments</h4>
51  
-		<p>The following arguments need to be passed to the command line:</p>
52  
-		<table class="definitionTable">
53  
-			<tr>
54  
-				<td><b><code>-src</code></b></td>
55  
-				<td>Required</td>
56  
-				<td>Path to source directory, containing content and decorators</td>
57  
-			</tr>
58  
-			<tr>
59  
-				<td><b><code>-dest</code></b></td>
60  
-				<td>Required</td>
61  
-				<td>Path to destination directory, where decorated content will be written</td>
62  
-			</tr>
63  
-			<tr>
64  
-				<td><b><code>-dest</code></b></td>
65  
-				<td>Required</td>
66  
-				<td>Path to destination directory, where decorated content will be written</td>
67  
-			</tr>
68  
-			<tr>
69  
-				<td><b><code>-config</code></b></td>
70  
-				<td rowspan="2">One of these</td>
71  
-				<td>Path to <a href="configuration.html">configuration file</a></td>
72  
-			</tr>
73  
-			<tr>
74  
-				<td><b><code>-decoratorMapping</code></b></td>
75  
-				<td>TODO</a></td>
76  
-			</tr>
77  
-			<tr>
78  
-				<td><b><code>FILE1 FILE2 FILE3...</code></b></td>
79  
-				<td>Required</td>
80  
-				<td>List of content files to apply decorators to. These must be relative to the <code>src</code> directory</td>
81  
-			</tr>
82  
-		</table>
83  
-		
84  
-		<h4>Example</h4>
85  
-		<pre class="code">java -jar sitemesh-3.x.jar -src project/src -config project/sitemesh.xml -dest project/build index.html page1.html page2.html</pre>
86  
-		
87  
-		<h2>Ant Task</h2>
88  
-
89  
-        <h3>Overview</h3>
90  
-        <p>The sitemesh.jar comes prepackaged with a custom Ant task that can be used for offline processing. In the following examples, we're going to look
91  
-        at how to install and use the SiteMeshTask to generate static content in the offline mode.</p>
92  
-
93  
-        <h3>SiteMeshTask</h3>
94  
-        <p>The SiteMeshTask defines the following attributes:</p>
95  
-        <ol>
96  
-            <li>destDir - The output folder in which all of the decorated files will be placed.</li>
97  
-            <li>config - The location of the SiteMesh configuration file.</li>
98  
-            <li>srcdir - The source directory which contains all of the files to be decorated.</li>
99  
-            <li>includes - An Ant style filter of what files to include.</li>
100  
-            <li>excludes - An Ant style filter of what files to exclude.</li>
101  
-        </ol>
102  
-        <p>The SiteMeshTask can also accept the following child nodes:</p>
103  
-        <ol>
104  
-            <li>fileset - The standard Ant <a href="http://ant.apache.org/manual/CoreTypes/fileset.html">FileSet</a> that will use the srcdir of the sitemesh node.</li>
105  
-            <li>sitemeshfileset - A custom SiteMesh FileSet that supports an additional attribute called "decorator" which can be used to associate a decorator with the
106  
-                given FileSet.</li>
107  
-        </ol>
108  
-
109  
-        <h3>Getting started!</h3>
110  
-        <p>The below provides a high level outline of what steps we're going to cover in this section.</p>
111  
-        <ol>
112  
-            <li>Create a SiteMesh configuration file.</li>
113  
-            <li>Register the SiteMeshTask with Ant</li>
114  
-            <li>Define the &lt;<span class="node">sitemesh</span>/&gt; node.</li>
115  
-            <li>Execute Ant</li>
116  
-        </ol>
117  
-
118  
-        <h4>1. Creating the SiteMesh configuration file</h4>
119  
-        <p>The SiteMeshTask can be given a configuration file to tell SiteMesh how to decorate files. The power of this feature is that the configuration is then
120  
-            externalized from the buid.xml file. In our first two examples, we're going to show how to use this form of the SiteMeshTask. Below is a very simple
121  
-            SiteMesh configuration file that applies the main.html decorator to all pages.</p>
122  
-    <pre>&lt;<span class="node">sitemesh</span>&gt;
123  
-  &lt;<span class="node">mapping</span> <span class="attribute">path</span>="/*" <span class="attribute">decorator</span>="/decorators/main.html"/&gt;
124  
-&lt;<span class="node">/sitemesh</span>&gt;
125  
-</pre>
126  
-
127  
-		<h4>2. Registering SiteMeshTask with Ant</h4>
128  
-        <p>In order to use SiteMesh from within Ant, the first thing you will need to do is register the SiteMeshTask with Ant using the following
129  
-        &lt;<span class="node">taskdef</span>/&gt; declaration.</p>
130  
-		<pre class="code">&lt;<span class="node">project</span> <span class="attribute">name</span>="my-ant-project"&gt;
131  
-
132  
-  <b>&lt;<span class="node">taskdef</span> <span class="attribute">name</span>="sitemesh"
133  
-           <span class="attribute">classname</span>="org.sitemesh.ant.SiteMeshTask"
134  
-           <span class="attribute">classpath</span>="path/to/sitemesh-3.x.jar"/&gt;</b>
135  
-
136  
-  ...
137  
-
138  
-&lt;<span class="node">/project</span>&gt;</pre>
139  
-        <p>For more information on registering custom tasks within Ant, please see <a href="http://ant.apache.org/manual/tutorial-writing-tasks.html" target="_new">Writing Ant Tasks</a>.</p>
140  
-
141  
-        <h4>3. Define the &lt;<span class="node">sitemesh</span>/&gt; node.</h4>
142  
-        <p>Now that we've created the SiteMesh configuration file and registered the SiteMeshTask with Ant, it's time to start using SiteMesh within our tasks.</p>
143  
-
144  
-        <h5>Using the sitemesh task without a fileset.</h5>
145  
-        <p>Let's look at how to provide &lt;<span class="node">sitemesh</span>/&gt; with a configuration file and tell it what directories to include or exclude.</p>
146  
-        <p>In this example, we're going to process all of the files stored in "project/src" and place the decorated files into "project/build".</p>
147  
-		<pre class="code">&lt;<span class="node">project</span> <span class="attribute">name</span>="my-ant-project"&gt;
148  
-
149  
-  &lt;<span class="node">target</span> <span class="attribute">name</span>="my-target"&gt;
150  
-    <b>&lt;<span class="node">sitemesh</span> <span class="attribute">srcdir</span>="project/src"
151  
-              <span class="attribute">config</span>="project/sitemesh.xml"
152  
-              <span class="attribute">destdir</span>="project/build"
153  
-              <span class="attribute">includes></span>="**/*.html"
154  
-              <span class="attribute">excludes</span>="decorators/*"/&gt;</b>
155  
-  &lt;<span class="node">/target</span>&gt;
156  
- 
157  
-&lt;<span class="node">/project</span>&gt;</pre>
158  
-
159  
-        <p>The benefit to the above is that all configuration is externalized from the the build.xml file.</p>
160  
-
161  
-        <h5>Using the sitemesh task with the sitemeshfileset</h5>
162  
-        <p>In the below example, multiple source folders are used by provided a sitemeshfileset. This provides greater control over what folders
163  
-        should be included or excluded, but still leverage a common destination folder and configuration file.</p>
164  
-	<pre class="code">&lt;<span class="node">project</span> <span class="attribute">name</span>="my-ant-project"&gt;
165  
-
166  
-         &lt;<span class="node">sitemesh</span> <span class="attribute">destdir</span>="site/documentation"
167  
-                  <span class="attribute">config</span>="config/sitemesh.xml"&gt;
168  
-            &lt;<span class="node">sitemeshfileset</span> <span class="attribute">dir</span>="documentation"&gt;
169  
-                &lt;<span class="node">include</span> <span class="attribute">name</span>="**/*.html"/&gt;
170  
-                &lt;<span class="node">exclude</span> <span class="attribute">name</span>="private/*"/&gt;
171  
-            &lt;<span class="node">/sitemeshfileset</span>&gt;
172  
-
173  
-            &lt;<span class="node">sitemeshfileset</span> <span class="attribute">dir</span>="presentation"&gt;
174  
-                &lt;<span class="node">include</span> <span class="attribute">name</span>="**/*.html"/&gt;
175  
-            &lt;<span class="node">/sitemeshfileset</span>&gt;
176  
-        &lt;<span class="node">/sitemesh</span>&gt;
177  
-        
178  
-&lt;<span class="node">/project</span>&gt;</pre>
179  
-
180  
-        <h5>Using the sitemesh task with the sitemeshfileset with an associated decorator</h5>
181  
-        <p>In our finaly example, a decorator will be used on each sitemeshfileset.</p>
182  
-	<pre class="code">&lt;<span class="node">project</span> <span class="attribute">name</span>="my-ant-project"&gt;
183  
-
184  
-    &lt;<span class="node">target</span> <span class="attribute">name</span>="generate-with-custom-decorator"
185  
-            <span class="attribute">description</span>="Generate static content that's internal to the company."&gt;
186  
-        &lt;<span class="node">sitemesh</span> <span class="attribute">destdir</span>="site/documentation"&gt;
187  
-            &lt;<span class="node">sitemeshfileset</span> <span class="attribute">dir</span>="documentation"
188  
-                             <span class="attribute">decorator</span>="decorators/private.html"&gt;
189  
-                &lt;<span class="node">include</span> <span class="attribute">name</span>="private/*.html"/&gt;
190  
-            &lt;<span class="node">/sitemeshfileset</span>&gt;
191  
-        &lt;<span class="node">/sitemesh</span>&gt;
192  
-    &lt;<span class="node">/target</span>&gt;
193  
-
194  
-&lt;<span class="node">/project</span>&gt;</pre>
195  
-	</body>
196  
-</html>
BIN  sitemesh-docs/src/main/webapp/overview.gif
22  sitemesh-docs/src/main/webapp/overview.html
... ...
@@ -1,22 +0,0 @@
1  
-<html>
2  
-	<head>
3  
-		<title>SiteMesh3 Overview</title>
4  
-	</head>
5  
-	<body>
6  
-		
7  
-		<ul>
8  
-			<li>SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in 
9  
-			creating sites consisting of pages for which a consistent look/feel, navigation and layout scheme is required.</li>
10  
-			<li>SiteMesh intercepts requests to any static or dynamically generated HTML page requested through the 
11  
-			web-server, processes the content and then merges it with one or more <i>decorators</i> to build the final result.</li>
12  
-			<li>SiteMesh can also be used compose large pages of smaller pages and layouts.</li>
13  
-			<li>SiteMesh is fast. Really fast.</li>
14  
-			<li>SiteMesh can be used in Java based web-applications, or applied to content as an offline job.</li>
15  
-			<li>SiteMesh is extensible.</li>
16  
-			<li><a href="getting-started.html">Get started...</a></li>
17  
-		</ul>
18  
-		
19  
-		<p style="text-align:center; padding: 20px;"><img src="overview.gif" width="585" height="825" alt="" border=""/></p>
20  
-
21  
-	</body>
22  
-</html>

0 notes on commit 45de21f

Please sign in to comment.
Something went wrong with that request. Please try again.