You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by bu...@apache.org on 2015/07/19 23:21:30 UTC

svn commit: r958985 [9/29] - in /websites/production/tapestry/content: ./ 2009/09/13/ 2009/10/27/ 2009/11/25/ 2010/07/18/ 2010/07/24/ 2010/10/11/ 2010/10/31/ 2010/11/18/ 2010/12/16/ 2010/12/17/ 2011/01/18/ 2011/03/23/ 2011/03/29/ 2011/03/30/ 2011/03/31...

Modified: websites/production/tapestry/content/configuration.html
==============================================================================
--- websites/production/tapestry/content/configuration.html (original)
+++ websites/production/tapestry/content/configuration.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -58,10 +68,17 @@
 
 <div id="content">
 <div id="ConfluenceContent"><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><h1 id="Configuration-ConfiguringTapestry">Configuring Tapestry</h1><p>This page discusses all the ways in which Tapestry can be configured. Tapestry applications are configured almost entirely using Java, with very little XML at all.</p><p><strong>Contents</strong></p><p></p><div class="toc-macro client-side-toc-macro" data-headerelements="H2"></div><h2 id="Configuration-XMLconfiguration(web.xml)">XML configuration (web.xml)</h2><p>Tapestry runs on top of the standard Java Servlet API. To the servlet container, such as Tomcat, Tapestry appears as a <em>servlet filter</em>. This gives Tapestry great flexibility in matching URLs without requiring lots of XML configuration.</p><p>Although most configuration is done with Java, a small but necessary amount of configuration occurs inside the servl
 et deployment descriptor, WEB-INF/web.xml. Most of the configuration is boilerplate, nearly the same for all applications.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>web.xml (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;!DOCTYPE web-app
-      PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
-      &quot;http://java.sun.com/dtd/web-app_2_3.dtd&quot;&gt;
+<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><h1 id="Configuration-ConfiguringTapestry">Configuring Tapestry</h1><p>This page discusses all the ways in which Tapestry can be configured. Tapestry applications are configured almost entirely using Java, with very little XML at all.</p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1437340864993 {padding: 0px;}
+div.rbtoc1437340864993 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1437340864993 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1437340864993">
+<ul class="toc-indentation"><li><a shape="rect" href="#Configuration-XMLconfiguration(web.xml)">XML configuration (web.xml)</a></li><li><a shape="rect" href="#Configuration-YourApplication'sModuleClass">Your Application's Module Class</a></li><li><a shape="rect" href="#Configuration-ConfigurationSymbolNames">Configuration Symbol Names</a></li><li><a shape="rect" href="#Configuration-SettingComponentParameterDefaults">Setting Component Parameter Defaults</a></li><li><a shape="rect" href="#Configuration-ConfiguringIgnoredPaths">Configuring Ignored Paths</a></li><li><a shape="rect" href="#Configuration-ConfiguringContentTypeMapping">Configuring Content Type Mapping</a></li><li><a shape="rect" href="#Configuration-SettingExecutionModes">Setting Execution Modes</a></li></ul>
+</div><h2 id="Configuration-XMLconfiguration(web.xml)">XML configuration (web.xml)</h2><p>Tapestry runs on top of the standard Java Servlet API. To the servlet container, such as Tomcat, Tapestry appears as a <em>servlet filter</em>. This gives Tapestry great flexibility in matching URLs without requiring lots of XML configuration.</p><p>Although most configuration is done with Java, a small but necessary amount of configuration occurs inside the servlet deployment descriptor, WEB-INF/web.xml. Most of the configuration is boilerplate, nearly the same for all applications.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>web.xml (partial)</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;!DOCTYPE web-app
+      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+      "http://java.sun.com/dtd/web-app_2_3.dtd"&gt;
 &lt;web-app&gt;
     &lt;display-name&gt;My Tapestry Application&lt;/display-name&gt;
     &lt;context-param&gt;
@@ -77,28 +94,28 @@
         &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
     &lt;/filter-mapping&gt;
 &lt;/web-app&gt;
-]]></script>
+</pre>
 </div></div><div class="navmenu" style="float:right; width:30%; background:#eee; margin:3px; padding:3px">
 <p><font color="#539126"><strong>Tapestry Requests vs. Container Requests</strong></font></p>
 
 <p>The Tapestry filter matches all the requests that apply to Tapestry, and passes the rest off to the servlet container. In situations where there would be a naming conflict, actual files inside the web application take precedence over Tapestry pages.</p>
 
 <p>Tapestry recognizes the <em>root URL</em>, where the servlet path is simply "/", and renders the application page "Index", if it exists.</p></div><p>The application-specific part, the <code>tapestry.app-package</code> context parameter, provides your application's root package name. Tapestry uses this to locate your page and component classes. It expects page classes in the <code>pages</code> sub-package and components in the <code>components</code> sub-package. In the example above, page classes will be stored in the <code>org.example.myapp.pages</code> package (or in sub-packages below). Likewise, component classes will be stored in the <code>org.example.myapp.components</code> package.</p><p>By convention, the filter name (<code>filter-name</code>) is almost always "app", but you can use any name you want. Tapestry uses this to determine what <em>module class</em> name to look for (see below).</p><h2 id="Configuration-YourApplication'sModuleClass">Your Application's Module Cla
 ss</h2><p>Main Article: <a shape="rect" href="tapestry-ioc-configuration.html">Tapestry IoC Configuration</a></p><p>Most other configuration occurs inside your application's module class. The application module class will often define new services, provide overrides of services, or make contributions to service configurations.</p><p>Tapestry looks for your application module class in the services package (under the root package) of your application. It capitalizes the &lt;filter-name&gt; and appends "Module". In the previous example, because the filter name was "app" and the application's root package name is "org.example.myapp", the module class would be org.example.myapp.services.AppModule.</p><p>If such a class exists, it is added to the IoC Registry. It is not an error for your application to not have a module class, though any non-trivial application will have one.</p><p>Your application module class (usually AppModule.java) will typically override some of Tapestry's default, o
 r "factory", symbols, by contributing overrides to the ApplicationDefaults service configuration. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class AppModule
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class AppModule
 {
   public static void contributeApplicationDefaults(MappedConfiguration&lt;String,String&gt; configuration)
   {
-    configuration.add(SymbolConstants.SUPPORTED_LOCALES, &quot;en,fr,de&quot;);
-    configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, &quot;10 m&quot;);
+    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,fr,de");
+    configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, "10 m");
   }
 }
-]]></script>
+</pre>
 </div></div><h2 id="Configuration-ConfigurationSymbolNames">Configuration Symbol Names</h2><p>Main Article: <a shape="rect" href="symbols.html">Symbols</a></p><p>Many of Tapestry's built-in services (some of which are not even public) are configured via symbols. These symbols can be overridden by contributing to the ApplicationDefaults service configuration, or by placing a &lt;context-param&gt; element into the application's web.xml, or on the command line by defining JVM System Properties with the -D command line option.</p><p>These symbols are always defined in terms of strings, and those strings are coerced to the appropriate type (a number, a boolean, etc.). Of special note are <em>time intervals</em>, which are specified in a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html">particular format</a>.</p><p>Each of these symbols has a corresponding constant defined in the <a shape="rect" class="e
 xternal-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html">SymbolConstants</a> class.</p><h3 id="Configuration-tapestry.app-catalog">tapestry.app-catalog</h3><p>The location of the global application message catalog, the default is context:WEB-INF/<em>app-name</em>.properties.</p><h3 id="Configuration-tapestry.application-version">tapestry.application-version</h3><p>The version of the application, which is incorporated into URLs for context and classpath assets. Assets may be <a shape="rect" href="response-compression.html">compressed</a>, and will have far-future expiration headers; they will be aggressively cached by the client web browser. You should change the application version on each new deployment of the application (that is, any time assets in the context change), to force clients to re-download changed versions of files. If you do not specify an application version, a <em>random</em> one will be assigned on every deployment (
 which is good for development but very bad for production).</p><h3 id="Configuration-tapestry.application-folder">tapestry.application-folder</h3>
 
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-<p>&#160;</p></div><p>The folder, of the context, in which the Tapestry application executes. By default this is blank, meaning the Tapestry application executes in the root of the web application context. Setting this value allows the Tapestry application to be <a shape="rect" href="#Configuration-SegregatingApplicationsIntoFolders">segregated into a folder</a>, which can be useful when Tapestry is executed inside a web application with other servlets or filters.</p><h3 id="Configuration-tapestry.asset-url-fully-qualified">tapestry.asset-url-fully-qualified</h3>
+<p>&#160;</p></div><p>The folder, of the context, in which the Tapestry application executes. By default this is blank, meaning the Tapestry application executes in the root of the web application context. Setting this value allows the Tapestry application to be <a shape="rect" href="configuration.html">segregated into a folder</a>, which can be useful when Tapestry is executed inside a web application with other servlets or filters.</p><h3 id="Configuration-tapestry.asset-url-fully-qualified">tapestry.asset-url-fully-qualified</h3>
 
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
@@ -143,7 +160,7 @@
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.4</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-<p>&#160;</p></div><p>As with <a shape="rect" href="#Configuration-tapestry.asset-path-prefix">tapestry.asset-path-prefix</a> but for compressed versions of assets. At render time, Tapestry determines whether each asset is compressable (for example, image file formats are not). A path for either tapestry.asset-path-prefix or this prefix is selected at render time. Defaults to the asset path prefix with ".gz" appended.</p><h3 id="Configuration-tapestry.context-path">tapestry.context-path</h3>
+<p>&#160;</p></div><p>As with <a shape="rect" href="configuration.html">tapestry.asset-path-prefix</a> but for compressed versions of assets. At render time, Tapestry determines whether each asset is compressable (for example, image file formats are not). A path for either tapestry.asset-path-prefix or this prefix is selected at render time. Defaults to the asset path prefix with ".gz" appended.</p><h3 id="Configuration-tapestry.context-path">tapestry.context-path</h3>
 
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.4</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
@@ -168,7 +185,7 @@
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3.6</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-<p>&#160;</p></div><p>If "true", then resources (individually or when aggregated into stacks) will be minimized via the ResourceMinimizer service. If "false", then minification is disabled. The default is "true" in production mode, "false" otherwise.</p><p>Note that Tapestry's default implementation of ResourceMinimizer does nothing; minification is provided by add-on libraries.</p><h3 id="Configuration-tapestry.encode-locale-into-path">tapestry.encode-locale-into-path</h3><p>If "true" (the default), then the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/PersistentLocale.html">PersistentLocale</a> will be encoded into URLs by the ComponentEventLinkEncoder service. If overridden to "false" this does not occur, but you should provide a LinkCreationListener2 (registered with the LinkCreationHub) in order to add the locale as a query parameter (or provide some alternate means of persisting the locale between requests
 ).</p><h3 id="Configuration-tapestry.exception-report-page">tapestry.exception-report-page</h3><p>The name of the page used to report exceptions. This defaults to "ExceptionReport".</p><h3 id="Configuration-tapestry.execution-mode">tapestry.execution-mode</h3><p>The execution mode. See <a shape="rect" href="#Configuration-SettingExecutionModes">Setting Execution Modes</a> below.</p><h3 id="Configuration-tapestry.file-check-interval">tapestry.file-check-interval</h3><p>Time interval between file system checks. During a file system check, only a single thread is active (all others are blocked) and any files loaded are checked for changes (this is part of <a shape="rect" href="#Configuration-reload.html">automatic component reloading</a>).</p><p>The default is "1 s" (one second; see <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html">Time Interval Formats</a>), and is usually overridden with a higher va
 lue in production (say, between one and five minutes).</p><h3 id="Configuration-tapestry.file-check-update-timeout">tapestry.file-check-update-timeout</h3><p>Time interval that Tapestry will wait to obtain the exclusive lock needed for a file check. If the exclusive lock can't be obtained in that amount of time, the request will proceed normally (without the check), but each successive request will attempt to get the lock and perform the check until successful.</p><p>The default is "50 ms" (50 milliseconds; see <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html">Time Interval Formats</a>).</p><h3 id="Configuration-tapestry.force-absolute-uris">tapestry.force-absolute-uris</h3>
+<p>&#160;</p></div><p>If "true", then resources (individually or when aggregated into stacks) will be minimized via the ResourceMinimizer service. If "false", then minification is disabled. The default is "true" in production mode, "false" otherwise.</p><p>Note that Tapestry's default implementation of ResourceMinimizer does nothing; minification is provided by add-on libraries.</p><h3 id="Configuration-tapestry.encode-locale-into-path">tapestry.encode-locale-into-path</h3><p>If "true" (the default), then the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/PersistentLocale.html">PersistentLocale</a> will be encoded into URLs by the ComponentEventLinkEncoder service. If overridden to "false" this does not occur, but you should provide a LinkCreationListener2 (registered with the LinkCreationHub) in order to add the locale as a query parameter (or provide some alternate means of persisting the locale between requests
 ).</p><h3 id="Configuration-tapestry.exception-report-page">tapestry.exception-report-page</h3><p>The name of the page used to report exceptions. This defaults to "ExceptionReport".</p><h3 id="Configuration-tapestry.execution-mode">tapestry.execution-mode</h3><p>The execution mode. See <a shape="rect" href="configuration.html">Setting Execution Modes</a> below.</p><h3 id="Configuration-tapestry.file-check-interval">tapestry.file-check-interval</h3><p>Time interval between file system checks. During a file system check, only a single thread is active (all others are blocked) and any files loaded are checked for changes (this is part of <a shape="rect" href="configuration.html">automatic component reloading</a>).</p><p>The default is "1 s" (one second; see <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html">Time Interval Formats</a>), and is usually overridden with a higher value in production (say, be
 tween one and five minutes).</p><h3 id="Configuration-tapestry.file-check-update-timeout">tapestry.file-check-update-timeout</h3><p>Time interval that Tapestry will wait to obtain the exclusive lock needed for a file check. If the exclusive lock can't be obtained in that amount of time, the request will proceed normally (without the check), but each successive request will attempt to get the lock and perform the check until successful.</p><p>The default is "50 ms" (50 milliseconds; see <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html">Time Interval Formats</a>).</p><h3 id="Configuration-tapestry.force-absolute-uris">tapestry.force-absolute-uris</h3>
 
 <div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Deprecated since 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
@@ -265,26 +282,26 @@
 <p> Some components, notably Grid, Pallete and Zone, have default parameter values specified in terms of symbols. This means you can use these symbols to modify the defaults for all instances of such components in your application. For example, you can set the default rows per page for all Grid instances by adding this to the <code>contributeApplicationDefaults</code> method in your application's module class (typically AppModule.java):</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-configuration.add(ComponentParameterConstants.GRID_ROWS_PER_PAGE, &quot;15&quot;);
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
+configuration.add(ComponentParameterConstants.GRID_ROWS_PER_PAGE, "15");
+</pre>
 </div></div>
 </div><p>See the complete list of such constants at <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ComponentParameterConstants.html">ComponentParameterConstants</a>.</p><h2 id="Configuration-ConfiguringIgnoredPaths">Configuring Ignored Paths</h2><p>You may sometimes need to use Tapestry in concert with other servlets. This can cause problems, since Tapestry (being a servlet filter) may see URLs intended for another servlet and attempt to process them.</p><p>The Servlet API does not provide Tapestry with any clues about what other servlets are available in the web application. Instead, you must configure Tapestry to ignore paths intended for other servlets.</p><p>The IgnoredPathsFilter service is the method for this kind of configuration. Its configuration is an unordered collection of regular expression patterns. A request whose path matches any of these patterns is <strong>not</strong> processed by Tapestry.</p><p>For exa
 mple, say you are using <a shape="rect" class="external-link" href="http://getahead.org/dwr/" >Direct Web Remoting</a>. You'll likely have the servlet path /dwr mapped to the Direct Web Remoting servlet.</p><p>You contribution would look like:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  public static void contributeIgnoredPathsFilter(Configuration&lt;String&gt; configuration)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public static void contributeIgnoredPathsFilter(Configuration&lt;String&gt; configuration)
   {
-    configuration.add(&quot;/dwr/.*&quot;);
+    configuration.add("/dwr/.*");
   }
-]]></script>
+</pre>
 </div></div><p>The regular expression matches any path that begins with "/dwr/".</p><p>The regular expressions provided in the configuration are always compiled with case insensitivity enabled.</p><p>Also note that actual files in your web application (images, stylesheets, etc.) are always ignored by Tapestry.</p><h2 id="Configuration-ConfiguringContentTypeMapping">Configuring Content Type Mapping</h2><p>The mapping from file type (by extension) to content type is typically done as part of your servlet-containers configuration. Alternately, you may contribute to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/ResourceStreamer.html">ResourceStreamer</a> service's configuration. This is a mapped configuration; it maps file extensions (such as "css" or "js") to content types ("text/css" or "text/javascript") respectively.</p><h2 id="Configuration-SettingExecutionModes">Setting Execution Modes</h2><p>Start
 ing with Tapestry 5.2.4, we can specify an <em>execution mode</em> by loading specific Tapestry Modules through a JVM System property. All modules declared in this way will be loaded after the AppModule of your application. This feature is very useful for defining a different environment for Production and Development modes, for example.</p><p>This JVM System property, named tapestry.execution-mode, is a comma-separated list of mode names. You can declare this property in a number of different ways:</p><p>1. Add the parameter to your JVM command line:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[-Dtapestry.execution-mode=uat jetty:run
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">-Dtapestry.execution-mode=uat jetty:run
+</pre>
 </div></div><p>2. Add the parameter to the Jetty plugin:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;plugin&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;plugin&gt;
     &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
     &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
     &lt;version&gt;6.1.16&lt;/version&gt;
     &lt;configuration&gt;
-        &lt;requestLog implementation=&quot;org.mortbay.jetty.NCSARequestLog&quot;&gt;
+        &lt;requestLog implementation="org.mortbay.jetty.NCSARequestLog"&gt;
             &lt;append&gt;true&lt;/append&gt;
         &lt;/requestLog&gt;
         &lt;systemProperties&gt;
@@ -295,9 +312,9 @@ configuration.add(ComponentParameterCons
         &lt;/systemProperties&gt;
     &lt;/configuration&gt;
 &lt;/plugin&gt;
-]]></script>
+</pre>
 </div></div><p>3. Add the parameter to the Surefire plugin for your test:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;plugin&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;plugin&gt;
     &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
     &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
     &lt;version&gt;2.8.1&lt;/version&gt;
@@ -307,9 +324,9 @@ configuration.add(ComponentParameterCons
        &lt;/systemPropertyVariables&gt;
     &lt;/configuration&gt;
 &lt;/plugin&gt;
-]]></script>
+</pre>
 </div></div><p>For each mode declared in your JVM System Property, TapestryFilter checks for a parameter in your web.xml, named tapestry.TheModeName-modules, with TheModeName being the name of the desired mode. Its value will be a comma-separated list of modules.</p><p>If the tapestry.execution-mode is not declared, Tapestry will automatically look for the tapestry.production-modules parameter, because &#8220;production&#8221; is the default tapestry.execution-mode value.</p><p>The example below defines two different execution modes in your web.xml file: production (the default value) and uat (for "user acceptance testing"). For each mode, we list the modules we want to load. If we use JVM System property declared in the example above, the UatModeModule&#160;module will be loaded.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>web.xml</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;context-param&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;context-param&gt;
     &lt;param-name&gt;tapestry.production-modules&lt;/param-name&gt;
     &lt;param-value&gt;com.example.myapp.services.ProductionModeModule&lt;/param-value&gt;
 &lt;/context-param&gt;
@@ -322,10 +339,10 @@ configuration.add(ComponentParameterCons
     &lt;param-name&gt;tapestry.integration-modules&lt;/param-name&gt;
     &lt;param-value&gt;com.example.myapp.services.IntegrationModeModule&lt;/param-value&gt;
 &lt;/context-param&gt;
-]]></script>
+</pre>
 </div></div><p>Execution mode itself may be a comma separated list:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[-Dtapestry.execution-mode=uat,integration jetty:run
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">-Dtapestry.execution-mode=uat,integration jetty:run
+</pre>
 </div></div><p><span style="color: rgb(83,145,38);font-size: 20.0px;line-height: 1.5;">Segregating Applications Into Folders</span></p><p>In many cases where Tapestry is being adopted into an existing web application (possibly written in Tapestry 4 or some other framework), it is nice to segregate the Tapestry application into its own folder, to avoid conflicts with the existing application or servlets.</p>
 
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
@@ -333,22 +350,22 @@ configuration.add(ComponentParameterCons
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
 <p>Support for application folders was added in release 5.3.</p>
 </div><p>Setting this up is in two parts:</p><ul><li>Modifying the configuration of the <code>&lt;url-pattern&gt;</code> for the Tapestry filter to match the specified folder.</li><li>Identifying the folder name using a Tapestry symbol value contribution.</li></ul><p>So, if you wanted to run the Tapestry application inside folder <code>t5app</code>, you would modify your <code>web.xml</code> indicate the use of the folder:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;filter-mapping&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">  &lt;filter-mapping&gt;
     &lt;filter-name&gt;app&lt;/filter-name&gt;
     &lt;url-pattern&gt;/t5app/*&lt;/url-pattern&gt;
   &lt;/filter-mapping&gt;
-]]></script>
+</pre>
 </div></div><p>... and in your AppModule, you would inform Tapestry about the mapping change:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class AppModule
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class AppModule
 {
     @Contribute(SymbolProvider.class)
     @ApplicationDefaults
     public static void applicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
     {
-        configuration.add(SymbolConstants.APPLICATION_FOLDER, &quot;t5app&quot;)
+        configuration.add(SymbolConstants.APPLICATION_FOLDER, "t5app")
     }
 }
-]]></script>
+</pre>
 </div></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This extra mapping is unfortunately necessary, because the Servlet API does not provide a way for a servlet filter, such as the one used by Tapestry, to know about its mapping.</p></div></div><p>This changes the servlet container to <em>only</em> forward requests inside the <code>t5app</code> folder to Tapestry; requests for other folders (or the root folder) will not be passed to Tapestry at all. The symbol contribution informs Tapestry to change the URLs it generates to include the necessary folder name; it also affects the logic in Tapestry that recognizes and handles requests.</p><p>In addition, if you choose to place page template files in the context, rather than on the classpath (as with component templates), then you will place those tem
 plate files inside the <code>t5app</code> folder.</p><p>At this time, it is still not possible to run multiple Tapestry 5 applications within the same web application.</p></div>
 </div>
 

Modified: websites/production/tapestry/content/confluence-site-setup.html
==============================================================================
--- websites/production/tapestry/content/confluence-site-setup.html (original)
+++ websites/production/tapestry/content/confluence-site-setup.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 

Modified: websites/production/tapestry/content/creating-the-skeleton-application.html
==============================================================================
--- websites/production/tapestry/content/creating-the-skeleton-application.html (original)
+++ websites/production/tapestry/content/creating-the-skeleton-application.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,16 +67,8 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><p>&#160;</p><p>&#160;<style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
-
-/*]]>*/</style></p><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="dependencies-tools-and-plugins.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="dependencies-tools-and-plugins.html">Dependencies, Tools and Plugins</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="exploring-the-project.html">Exploring the Project</a></td><td colspan="1" rowspan="1" class="Scroll
 barNextIcon"><a shape="rect" href="exploring-the-project.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>Before we can get down to the fun, we have to create an empty application. Tapestry uses a feature of Maven to do this: <strong>archetypes</strong> (a too-clever way of saying "project templates").<p>For the tutorial, we're using a fresh install of Eclipse and an empty workspace at <code>/users/joeuser/workspace</code>. You may need to adjust a few things for other operating systems or local paths.</p><h2 id="CreatingTheSkeletonApplication-UsingtheQuickstartArchetype">Using the Quickstart Archetype</h2><p>From Eclipse, we'll use a Maven archetype to create a skeleton Tapestry project.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Maven Behind a Firewall</p><span class="aui-icon aui-icon-small aui-iconfont-info conflue
 nce-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you are behind a firewall/proxy, before performing any Maven downloads, you may need to configure your proxy settings in your Maven settings.xml file (typically in the .m2 subdirectory of your home directory, ~/.m2 or C:\users\joeuser\.m2). Here is an example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>settings.xml</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;settings&gt;
+<div id="ConfluenceContent"><p>&#160;</p><p>&#160;Before we can get down to the fun, we have to create an empty application. Tapestry uses a feature of Maven to do this: <strong>archetypes</strong> (a too-clever way of saying "project templates").</p><p>For the tutorial, we're using a fresh install of Eclipse and an empty workspace at <code>/users/joeuser/workspace</code>. You may need to adjust a few things for other operating systems or local paths.</p><h2 id="CreatingTheSkeletonApplication-UsingtheQuickstartArchetype">Using the Quickstart Archetype</h2><p>From Eclipse, we'll use a Maven archetype to create a skeleton Tapestry project.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Maven Behind a Firewall</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you are behind a firewall/proxy, before performing any Maven downloads,
  you may need to configure your proxy settings in your Maven settings.xml file (typically in the .m2 subdirectory of your home directory, ~/.m2 or C:\users\joeuser\.m2). Here is an example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>settings.xml</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;settings&gt;
   &lt;proxies&gt;
     &lt;proxy&gt;
       &lt;active&gt;true&lt;/active&gt;
@@ -80,16 +82,8 @@ table.ScrollbarTable td.ScrollbarNextIco
   &lt;/proxies&gt;
   &lt;localRepository&gt;C:/Users/joeuser/.m2/repository&lt;/localRepository&gt;
 &lt;/settings&gt;
-]]></script>
-</div></div><p>Of course, adjust the <code>localRepository</code> element to match the correct path for your computer.</p></div></div><p>Okay, let's get started creating our new project.</p><p>In Eclipse, go to <strong>File &gt; New &gt;</strong> <strong>Project... &gt; Maven &gt; Maven Project</strong></p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/select-a-wizard.png" data-image-src="/confluence/download/attachments/23340356/select-a-wizard.png?version=1&amp;modificationDate=1416675284000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="49184818" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="select-a-wizard.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>T
 hen click <strong>Next</strong>, <strong>Next</strong> (again), and then on the <strong>Select an Archetype</strong> page click the <strong>Configure</strong> button on the Catalog line. The <strong>Archetype</strong> preferences dialog should appear. Click the <strong>Add Remote Catalog...</strong> button, as shown below:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/add-archetype-catalog.png" data-image-src="/confluence/download/attachments/23340356/add-archetype-catalog.png?version=1&amp;modificationDate=1416675354000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="49184819" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="add-archetype-catalog.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-
 container-version="64"></span></p><p>As shown above, enter <span class="nolink"><span class="nolink">"http://tapestry.apache.org"</span></span> in the Catalog File field, and "Apache Tapestry" in the Description field.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you want to try an unreleased (alpha or beta) version of Tapestry, use <span class="nolink">the https://repository.apache.org/content/repositories/staging</span> archetype catalog file instead.</p></div></div><p>Click <strong>OK</strong>, then<strong> OK</strong> again.</p><p>On the Select an Archetype dialog (shown below), select the newly-added Apache Tapestry catalog, then select the "quickstart" artifact from the list and click <strong>Next</strong>.</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedde
 d-image" src="creating-the-skeleton-application.data/select-archetype.png" data-image-src="/confluence/download/attachments/23340356/select-archetype.png?version=1&amp;modificationDate=1416675447000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="49184820" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="select-archetype.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>Fill in the Group Id, Artifact Id, Version and Package&#160; as follows:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/specify-archetype-parameters.png" data-image-src="/confluence/download/attachments/23340356/specify-archetype-parameters.png?version=1&amp;modificationDate=1416675494000&amp;api
 =v2" data-unresolved-comment-count="0" data-linked-resource-id="49184821" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="specify-archetype-parameters.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>then click Finish.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The first time you use Maven, project creation may take a while as Maven downloads a large number of JAR dependencies for Maven, Jetty and Tapestry. These downloaded files are cached locally and will not need to be downloaded again, but you do have to be patient on first use.</p></div></div><p>After Maven finishes, you'll see 
 a new directory, <code>tutorial in your Package Explorer view in Eclipse.</code></p><h2 id="CreatingTheSkeletonApplication-RunningtheApplicationusingJetty">Running the Application using Jetty</h2><p>One of the first things you can do is use Maven to run Jetty directly.</p><p>Right-click on the tutorial project in your Package Explorer view and select <strong>Run As &gt; Maven Build... &gt;</strong>, enter a Goal of <strong>"jetty:run"</strong>. This creates a "Run Configuration" named "tutorial1" that we'll use throughout this tutorial to start the app:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/run-configuration.png" data-image-src="/confluence/download/attachments/23340356/run-configuration.png?version=2&amp;modificationDate=1416744425000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="49184822" data-linked-resource-version="2" data-linked-resource-type="attachment" 
 data-linked-resource-default-alias="run-configuration.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>Tapestry runs best with a couple of additional options; click the "JRE" tab and enter the following VM Arguments:</p><pre></pre><p>-XX:MaxPermSize=256M</p><p>-Xmx600m</p><p>-Dtapestry.execution-mode=development</p><p><code><em>(If you're using JDK 1.8 then you should omit the MaxPermSize argument.)</em></code></p><p><code>Here's how it looks:<br clear="none"></code></p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/run-configuration-jre.png" data-image-src="/confluence/download/attachments/23340356/run-configuration-jre.png?version=2&amp;modificationDate=1416744425000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="49184
 838" data-linked-resource-version="2" data-linked-resource-type="attachment" data-linked-resource-default-alias="run-configuration-jre.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>Finally, click <strong>Run</strong>.</p><p>Again, the first time, there's a dizzying number of downloads, but before you know it, the Jetty servlet container is up and running.</p><p>Once Jetty is initialized (which only takes a few seconds after the first time), you'll see the following in your console:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/console-startup.png" data-image-src="/confluence/download/attachments/23340356/console-startup.png?version=2&amp;modificationDate=1416797756000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id=
 "49184841" data-linked-resource-version="2" data-linked-resource-type="attachment" data-linked-resource-default-alias="console-startup.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p><em>Note the red square icon above. Later on you'll use that icon to stop Jetty before restarting the app.</em></p><p>You can now open a web browser to <a shape="rect" class="external-link" href="http://localhost:8080/tutorial1/" >http://localhost:8080/tutorial1/</a> to see the running application:</p><p>&#160;</p><p><span class="confluence-embedded-file-wrapper image-left-wrapper"><img class="confluence-embedded-image confluence-content-image-border image-left" src="creating-the-skeleton-application.data/startpage.png" data-image-src="/confluence/download/attachments/23340356/startpage.png?version=7&amp;modificationDate=1416798158000&amp;api=v2" d
 ata-unresolved-comment-count="0" data-linked-resource-id="23527711" data-linked-resource-version="7" data-linked-resource-type="attachment" data-linked-resource-default-alias="startpage.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="23340356" data-linked-resource-container-version="64"></span></p><p>&#160;</p><div style="clear: both"></div><p style="text-align: left;">The date and time in the middle of the page shows that this is a live application.</p><p>This is a complete little web app; it doesn't do much, but it demonstrate how to create a number of pages sharing a common layout, and demonstrates some simple navigation and link handling. You can see that it has several different pages that share a common layout. (<span style="line-height: 1.4285715;"><em>Layout</em> is a loose term meaning common look and feel and navigation across many or all of the pages of an application. Often an appli
 cation will include a Layout component to provide that commonness.)</span></p><p>&#160;<style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
-
-/*]]>*/</style></p><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="dependencies-tools-and-plugins.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="dependencies-tools-and-plugins.html">Dependencies, Tools and Plugins</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="exploring-the-project.html">Exploring the Project</a></td><td colspan="1" rowspan="1" class="Scroll
 barNextIcon"><a shape="rect" href="exploring-the-project.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>&#160;<p>&#160;</p></div>
+</pre>
+</div></div><p>Of course, adjust the <code>localRepository</code> element to match the correct path for your computer.</p></div></div><p>Okay, let's get started creating our new project.</p><p>In Eclipse, go to <strong>File &gt; New &gt;</strong> <strong>Project... &gt; Maven &gt; Maven Project</strong></p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/select-a-wizard.png"></span></p><p>Then click <strong>Next</strong>, <strong>Next</strong> (again), and then on the <strong>Select an Archetype</strong> page click the <strong>Configure</strong> button on the Catalog line. The <strong>Archetype</strong> preferences dialog should appear. Click the <strong>Add Remote Catalog...</strong> button, as shown below:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/add-archetype-catalog.png"></span></p><p>As shown above, en
 ter <span class="nolink"><span class="nolink">"http://tapestry.apache.org"</span></span> in the Catalog File field, and "Apache Tapestry" in the Description field.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you want to try an unreleased (alpha or beta) version of Tapestry, use <span class="nolink">the https://repository.apache.org/content/repositories/staging</span> archetype catalog file instead.</p></div></div><p>Click <strong>OK</strong>, then<strong> OK</strong> again.</p><p>On the Select an Archetype dialog (shown below), select the newly-added Apache Tapestry catalog, then select the "quickstart" artifact from the list and click <strong>Next</strong>.</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/se
 lect-archetype.png"></span></p><p>Fill in the Group Id, Artifact Id, Version and Package&#160; as follows:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/specify-archetype-parameters.png"></span></p><p>then click Finish.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The first time you use Maven, project creation may take a while as Maven downloads a large number of JAR dependencies for Maven, Jetty and Tapestry. These downloaded files are cached locally and will not need to be downloaded again, but you do have to be patient on first use.</p></div></div><p>After Maven finishes, you'll see a new directory, <code>tutorial in your Package Explorer view in Eclipse.</code></p><h2 id="CreatingTheSkeletonApplication-Run
 ningtheApplicationusingJetty">Running the Application using Jetty</h2><p>One of the first things you can do is use Maven to run Jetty directly.</p><p>Right-click on the tutorial project in your Package Explorer view and select <strong>Run As &gt; Maven Build... &gt;</strong>, enter a Goal of <strong>"jetty:run"</strong>. This creates a "Run Configuration" named "tutorial1" that we'll use throughout this tutorial to start the app:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/run-configuration.png"></span></p><p>Tapestry runs best with a couple of additional options; click the "JRE" tab and enter the following VM Arguments:</p><pre></pre><p>-XX:MaxPermSize=256M</p><p>-Xmx600m</p><p>-Dtapestry.execution-mode=development</p><p><code><em>(If you're using JDK 1.8 then you should omit the MaxPermSize argument.)</em></code></p><p><code>Here's how it looks:<br clear="none"></code></p><p><span class="co
 nfluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/run-configuration-jre.png"></span></p><p>Finally, click <strong>Run</strong>.</p><p>Again, the first time, there's a dizzying number of downloads, but before you know it, the Jetty servlet container is up and running.</p><p>Once Jetty is initialized (which only takes a few seconds after the first time), you'll see the following in your console:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="creating-the-skeleton-application.data/console-startup.png"></span></p><p><em>Note the red square icon above. Later on you'll use that icon to stop Jetty before restarting the app.</em></p><p>You can now open a web browser to <a shape="rect" class="external-link" href="http://localhost:8080/tutorial1/" >http://localhost:8080/tutorial1/</a> to see the running application:</p><p>&#160;</p><p><span class="confluence-embedded-file-wrapper
  image-left-wrapper"><img class="confluence-embedded-image confluence-content-image-border image-left" src="creating-the-skeleton-application.data/startpage.png"></span></p><p>&#160;</p><div style="clear: both"></div><p style="text-align: left;">The date and time in the middle of the page shows that this is a live application.</p><p>This is a complete little web app; it doesn't do much, but it demonstrate how to create a number of pages sharing a common layout, and demonstrates some simple navigation and link handling. You can see that it has several different pages that share a common layout. (<span style="line-height: 1.4285715;"><em>Layout</em> is a loose term meaning common look and feel and navigation across many or all of the pages of an application. Often an application will include a Layout component to provide that commonness.)</span></p><p>&#160;&#160;</p><p>&#160;</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/css.html
==============================================================================
--- websites/production/tapestry/content/css.html (original)
+++ websites/production/tapestry/content/css.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -59,49 +69,49 @@
 <div id="content">
 <div id="ConfluenceContent"><h1 id="CSS-CascadingStyleSheets">Cascading Style Sheets</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><p>Most web applications delegate to <strong>Cascading Style Sheets</strong> (CSS) the stylistic details of the page &#8211; fonts, colors, margins, borders and alignment. This helps the remaining HTML to remain simple and semantic, which usually makes it easier to read and maintain.</p><p>Tapestry includes sophisticated support for CSS in the form of annotation-based linking, far-future expire headers, automatic duplicate removal, and other features provided for <a shape="rect" href="assets.html">assets</a>.</p><h2 id="CSS-Defaultstylesheet">Default style sheet</h2><p>Tapestry includes a built-in style sheet, tapestry.css, in all HTML documents (documents that have an outer &lt;html&gt; element and a nested &lt;head&gt; element), as part of the "core" JavaScript stack. The core JavaScript st
 ack also includes the CSS for <a shape="rect" class="external-link" href="http://getbootstrap.com/" >Bootstrap 3.1.1</a>.</p><h2 id="CSS-AddingyourownCSS">Adding your own CSS</h2><p>A page or component (for example, a <a shape="rect" href="layout-component.html">layout component</a>) that is rendering the &lt;head&gt; tag can add a style sheet directly in the markup.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;head&gt;
-  &lt;link href=&quot;/css/site.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;head&gt;
+  &lt;link href="/css/site.css" rel="stylesheet" type="text/css"/&gt;
   . . .
-]]></script>
+</pre>
 </div></div><p>If you want to leverage Tapestry's localization support, you may want to make use of an expansion and the "asset:" or "context:" binding prefix:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;head&gt;
-  &lt;link href=&quot;${context:css/site.css}&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;head&gt;
+  &lt;link href="${context:css/site.css}" rel="stylesheet" type="text/css"/&gt;
   . . .
-]]></script>
+</pre>
 </div></div><p>The "context:" prefix means that the remainder of the expansion is a path to a context asset, a resource in the web application root (<code>src/main/webapp</code> in your workspace). By contrast, the "asset:" prefix tells Tapestry to look in the class path. See <a shape="rect" href="assets.html">Assets</a>.</p><h2 id="CSS-Usingthe@Importannotation">Using the @Import annotation</h2><p>Another approach to adding a style sheet is to include an @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">Import</a> annotation (starting with Tapestry 5.2) on your component class:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Import(stylesheet=&quot;context:css/site.css&quot;)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Import(stylesheet="context:css/site.css")
 public class MyComponent
 {
 
 }
-]]></script>
+</pre>
 </div></div><p>(For Tapestry 5.0 and 5.1, use the deprecated <a shape="rect" class="external-link" href="http://tapestry.apache.org/5.2/apidocs/org/apache/tapestry5/annotations/IncludeStylesheet.html">@IncludeStyleSheet</a> annotation instead.)</p><p>As with <a shape="rect" href="legacy-javascript.html">included JavaScript libraries</a>, each style sheet will only be added once, regardless of the number of components that include it via the annotation.</p><h2 id="CSS-ConditionallyloadingIE-onlystylesheets">Conditionally loading IE-only style sheets</h2><p>For Tapestry 5.2 and later, if you need to load a different style sheet for Internet Explorer browsers, or for certain versions of IE browsers, you can use Tapestry's built-in support for IE conditional comments. Just add something like the following to your page or component (or layout) class:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Environmental
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Environmental
 private JavaScriptSupport javaScriptSupport;
      
-@Inject @Path(&quot;context:layout/ie-only.css&quot;)
+@Inject @Path("context:layout/ie-only.css")
 private Asset ieOnlyStylesheet;
 
 // add an IE-only style sheet if browser is IE
 void afterRender() {
     javaScriptSupport.importStylesheet(new StylesheetLink(ieOnlyStylesheet, new
-                        StylesheetOptions(null, &quot;IE&quot;)) );
+                        StylesheetOptions(null, "IE")) );
 }
-]]></script>
+</pre>
 </div></div><p>The above will render something like:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;!--[if IE]&gt;
-&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/assets/1.0-SNAPSHOT/ctx/layout/ie-only.css&quot;&gt;&lt;/link&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;!--[if IE]&gt;
+&lt;link type="text/css" rel="stylesheet" href="/assets/1.0-SNAPSHOT/ctx/layout/ie-only.css"&gt;&lt;/link&gt;
 &lt;![endif]--&gt;
-]]></script>
+</pre>
 </div></div><p>Naturally, the conditional part can be any other IE <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Conditional_comment" >conditional expression</a>, such as "lt IE 8".</p><h2 id="CSS-Suppressingthedefaultstylesheet(Tapestry5.3andearlier)">Suppressing the default style sheet (Tapestry 5.3 and earlier)</h2><p>Though it should be rarely needed, you can prevent Tapestry's default style sheet from loading by overriding the configuration in your application's module (normally AppModule.java):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(MarkupRenderer.class)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Contribute(MarkupRenderer.class)
 public static void deactiveDefaultCSS(OrderedConfiguration&lt;MarkupRendererFilter&gt; configuration)
 {
-    configuration.override(&quot;InjectDefaultStyleheet&quot;, null);
+    configuration.override("InjectDefaultStyleheet", null);
 }
-]]></script>
+</pre>
 </div></div><p>Note: In Tapestry 5.3 and later, the misspelled "InjectDefaultStyleheet" is corrected to "InjectDefaultStylesheet".</p><p>In Tapestry 5.4, the "core" JavaScript has a configuration into which you may inject overrides.</p><h2 id="CSS-OverridingBootstrap(Tapestry5.4andlater)">Overriding Bootstrap (Tapestry 5.4 and later)</h2><p>The SymbolConstants.BOOTSTRAP_ROOT ("tapestry.bootstrap-root") symbol tells Tapestry where the Bootstrap css file is. You can override that symbol (see <a shape="rect" href="configuration.html">Configuration</a>) to have it point to your own version of Bootstrap (or even to an empty file if you want to eliminate Bootstrap entirely).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[configuration.add(SymbolConstants.BOOTSTRAP_ROOT, &quot;classpath:/META-INF/assets&quot;);]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "classpath:/META-INF/assets");</pre>
 </div></div><p>For the above, your bootstrap.css file would be in your app's META-INF/assets/css folder.</p><p>&#160;</p></div>
 </div>
 

Modified: websites/production/tapestry/content/default-parameter.html
==============================================================================
--- websites/production/tapestry/content/default-parameter.html (original)
+++ websites/production/tapestry/content/default-parameter.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,17 +67,9 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
-
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%">&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="cookbook.html">Cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="overriding-exception-reporting.html">Overriding Exception Reporting</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="overriding-exception-reporting.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="DefaultParameter-DefaultParameter">Default Parameter</h1><div class="navmenu" style="float:right; background:#eee; margi
 n:3px; padding:3px">
+<div id="ConfluenceContent"><h1 id="DefaultParameter-DefaultParameter">Default Parameter</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><p>Many of the components provided with Tapestry share a common behavior: if the component's id matches a property of the container, then some parameter of the component (usually value) defaults to that property.</p><p>This is desirable, in terms of not having to specify the component's id and then specify the same value as some other parameter.</p><p>Let's say you have created a component, <code>RichTextEditor</code>, which operates like a normal TextArea component, but provides a JavaScript rich text editor. You might start with something like:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class RichTextEditor implements Field
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class RichTextEditor implements Field
 {
   @Property
   @Parameter(required=true)
@@ -75,17 +77,17 @@ table.ScrollbarTable td.ScrollbarNextIco
 
   . . . // Lots more code not shown here
 }
-]]></script>
+</pre>
 </div></div><p>However, the weakness here is when you make use of the component. You template may look like:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[    &lt;t:label for=&quot;profile&quot;/&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">    &lt;t:label for="profile"/&gt;
     &lt;br/&gt;
-    &lt;t:richtexteditor t:id=&quot;profile&quot; value=&quot;profile&quot;/&gt;
-]]></script>
+    &lt;t:richtexteditor t:id="profile" value="profile"/&gt;
+</pre>
 </div></div><p>Every component has a unique id; if you don't assign one with the <code>t:id</code> attribute, Tapestry will assign a less meaningful one. Component ids can end up inside URLs or used as query parameter names, so using meaningful ids helps if you are ever stuck debugging a request.</p><p>This repetition can be avoided by adding the <em>autoconnect</em> attribute to the @Parameter annotation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  @Property
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @Property
   @Parameter(required=true, autoconnect=true)
   private String value;
-]]></script>
+</pre>
 </div></div><p>This can now be written as <code>&lt;t:richtexteditor t:id="profile"/&gt;</code>. The unwanted repetition is gone: we set the id of the component and the property it edits in a single pass.</p><p>If there is no matching property, then a runtime exception will be thrown when loading the page because the value parameter is required and not bound.</p><p>The most common case of using autoconnect is form control components such as TextField and friends ... or this RichTextEditor.</p></div>
 </div>