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

svn commit: r913410 - in /websites/production/tapestry/content: assets.html cache/main.pageCache

Author: buildbot
Date: Mon Jun 23 19:19:34 2014
New Revision: 913410

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/assets.html
    websites/production/tapestry/content/cache/main.pageCache

Modified: websites/production/tapestry/content/assets.html
==============================================================================
--- websites/production/tapestry/content/assets.html (original)
+++ websites/production/tapestry/content/assets.html Mon Jun 23 19:19:34 2014
@@ -86,7 +86,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="configuration.html">Configuration</a>
+                            <a shape="rect" href="request-processing.html">Request Processing</a>
                     
                 
                             </div>
@@ -95,7 +95,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="request-processing.html">Request Processing</a>
+                            <a shape="rect" href="layout-component.html">Layout Component</a>
                     
                 
                             </div>
@@ -104,7 +104,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="layout-component.html">Layout Component</a>
+                            <a shape="rect" href="configuration.html">Configuration</a>
                     
                 
                             </div>
@@ -113,7 +113,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="javascript.html">JavaScript</a>
+                            <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a>
                     
                 
                             </div>
@@ -127,7 +127,7 @@
                 
                             </div>
         </li></ul>
-</div><p>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h2 id="Assets-AssetsinTemplates">Assets in Templates</h2><p>Assets can also be referenced directly in templates. Two <a shape="rect" href="component-parameters.html#ComponentParameters-binding-expressions">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpat
 h (the default) or from the web context (by specifying the "context:" domain explicitly):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div><p>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h3 id="Assets-AssetsinTemplates">Assets in Templates</h3><p>Assets can also be referenced directly in templates. Two <a shape="rect" href="component-parameters.html#ComponentParameters-binding-expressions">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpat
 h (the default) or from the web context (by specifying the "context:" domain explicitly):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${asset:context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
 ]]></script>
 </div></div>    <div class="aui-message hint shadowed information-macro">
@@ -139,17 +139,17 @@
 <p>Because accessing context assets is so common, the "context:" binding prefix was introduced:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
 ]]></script>
-</div></div><h2 id="Assets-AssetsinComponentClasses">Assets in Component Classes</h2><p>Components learn about assets via <a shape="rect" href="injection.html">injection</a>. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation allows Assets to be injected into components as read-only properties. The path to the resource is specified using the Path annotation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="Assets-AssetsinComponentClasses">Assets in Component Classes</h3><p>Components learn about assets via <a shape="rect" href="injection.html">injection</a>. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation allows Assets to be injected into components as read-only properties. The path to the resource is specified using the Path annotation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
 @Path(&quot;context:images/tapestry_banner.gif&quot;)
 private Asset banner;
 ]]></script>
-</div></div><p>Assets are located within <em>domains</em>; these domains are identified by the prefix on the @Path annotation's <code>value</code>.</p><p>If the prefix is omitted, the value will be interpreted as a path relative to the Java class file itself, within the "classpath:" domain. This is often used when creating component libraries, where the assets used by the components are packaged in the JAR with the components themselves.</p><p>Unlike elsewhere in Tapestry, <em>case matters</em>. This is because Tapestry is dependent on the Servlet API and the Java runtime to access the underlying files, and those APIs, unlike Tapestry, are case sensitive. Be aware that some <em>operating systems</em> (such as Windows) are case insensitive, which may mask errors that will be revealed at deployment (if the deployment operating system is case sensitive, such as Linux).</p><h2 id="Assets-RelativeAssets">Relative Assets</h2><p>You can use relative paths with domains (if you omit the pref
 ix):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Assets are located within <em>domains</em>; these domains are identified by the prefix on the @Path annotation's <code>value</code>.</p><h3 id="Assets-ClasspathAssets">Classpath Assets&#160;</h3><p>If the prefix is omitted, the value will be interpreted as a path relative to the Java class file itself, within the "classpath:" domain. This is often used when creating component libraries, where the assets used by the components are packaged in the JAR with the components themselves.</p><p>Unlike elsewhere in Tapestry, <em>case matters</em>. This is because Tapestry is dependent on the Servlet API and the Java runtime to access the underlying files, and those APIs, unlike Tapestry, are case sensitive. Be aware that some <em>operating systems</em> (such as Windows) are case insensitive, which may mask errors that will be revealed at deployment (if the deployment operating system is case sensitive, such as Linux).</p><p>In Tapestry 5.3 and earlier, classpath assets are pac
 kaged in the same folder as the compiled Java class (as well as component templates and so forth). Relative assets are based on this location, the location of the component's .class file.</p><p>In Tapestry 5.4, this is supported (but will generate a runtime warning). Classpath resources are expected to be stored under&#160;<code>META-INF/assets</code>.</p><p>In Tapestry 5.5, support for classpath assets&#160;<strong>not</strong> under&#160;<code>META-INF/assets</code> will be removed.</p><h3 id="Assets-META-INF/assets">META-INF/assets</h3><p>Support for storing assets under&#160;<code>META-INF/assets</code> was added in Tapestry 5.4.</p><p>For security reasons (detailed below), it is best to have the assets that will be exposed to the client segregated from compiled Java classes. For that reason, classpath assets must be stored in&#160;<code>META-INF/assets</code> or a subfolder.</p><p>For an&#160;<em>application</em> asset, the assets can be stored directly in&#160;<code>META-INF/a
 ssets</code>.</p><p>For a&#160;<em>library</em> asset, Tapestry uses the library's name (from its LibraryMapping) (such as "core" for the Tapestry core library); &#160;The library name becomes a folder under&#160;<code>META-INF/assets</code>; for example, Tapestry stores its component-related assets under&#160;<code>META-INF/assets/core</code>.</p><h3 id="Assets-RelativeAssets">Relative Assets</h3><p>You can use relative paths with domains (if you omit the prefix):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
-@Path(&quot;../edit.png&quot;)
+@Path(&quot;images/edit.png&quot;)
 private Asset icon;
 ]]></script>
-</div></div><p>Since you must omit the prefix, this only makes sense for components packaged in a library for reuse.</p><h2 id="Assets-SymbolsForAssets">Symbols For Assets</h2><p>Symbols inside the annotation value are expanded. This allows you to define a symbol and reference it as part of the path. For example, you could contribute a symbol named "skin.root" as "context:skins/basic" and then reference an asset from within it:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>This represents a relative path from the default location for the asset. For Tapestry 5.4, this will resolve as either relative to the component's class file (the logic for Tapestry 5.3 and earlier), or relative to the correct folder within&#160;<code>META-INF/assets</code> (the logic for Tapestry 5.4 and later).</p><p>You may use the standard&#160;<code>./</code> and&#160;<code>../</code> prefixes to refer to the current folder, and containing folder, respectfully.</p><p>Since you must omit the asset domain prefix in order to specify a relative path, this only makes sense for components packaged in a library for reuse.</p><h3 id="Assets-SymbolsForAssets">Symbols For Assets</h3><p>Symbols inside the annotation value are expanded. This allows you to define a symbol and reference it as part of the path. For example, you could contribute a symbol named "skin.root" as "context:skins/basic" and then reference an asset from within it:</p><div class="code panel pdl" style="b
 order-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
 @Path(&quot;${skin.root}/style.css&quot;)
 private Asset style;
@@ -160,17 +160,29 @@ private Asset style;
                             <p>The use of the <code>${...</code>} syntax here is a <em>symbol expansion</em> (because it occurs in an annotation in Java code), rather than a <em>template expansion</em> (which occurs only in Tapestry template files).</p>
                     </div>
     </div>
-<p>An override of the skin.root symbol would affect all references to the named asset.</p><h2 id="Assets-LocalizationofAssets">Localization of Assets</h2><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h2 id="Assets-NewAssetDomains">New Asset Domains</h2><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSour
 ce.html">AssetSource</a> service configuration.</p><h2 id="Assets-AssetURLs">Asset URLs</h2><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h2 id="Assets-PerformanceNotes">Performance Notes</h2><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important pe
 rformance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html#Configuration-tapestry.gzipcompressionenabled">explicitly disable it</a>.</p><p>When Tapestry generates a URL for an asset, either on the classpath or from the context, the URL includes the application version number. Further, the asset will get a <em>far future expires header</em>, which will encourage the client browser to cache the asset.</p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed once the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html#Configuration-tapestry.applicationversion
 ">version number</a>, to force existing clients to re-download all assets.</p><h2 id="Assets-AssetSecurity">Asset Security</h2><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your Login page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious client copies
  the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicate that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's contents. If the query parameter is absent, or doesn't match the actual file's content, the request 
 is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</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">
+<p>An override of the skin.root symbol would affect all references to the named asset.</p><h3 id="Assets-LocalizationofAssets">Localization of Assets</h3><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h3 id="Assets-NewAssetDomains">New Asset Domains</h3><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSour
 ce.html">AssetSource</a> service configuration.</p><h3 id="Assets-AssetFingerprinting(Tapestry5.3andearlier)">Asset Fingerprinting (Tapestry 5.3 and earlier)</h3><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h3 id="Assets-AssetFingerprinting(Tapestry5.4andlater)">Asset Fingerprinting<span style="line-height: 1.5;">&#160;(Tapestry 5.4 
 and later)</span></h3><p>Tapestry 5.4 changes how Asset URLs are constructed, the version number is now a&#160;<em>content fingerprint</em>; it is a hash of the actual content of the asset.</p><p>Assets get a far-future expires header. It is no longer necessary or desirable to change the application version number.</p><p>During development or production, if an asset is changed in any way, it will have a new content fingerprint and will appear, to the browser, to be an entirely new immutable resource.</p><h3 id="Assets-CSSLinkRewriting">CSS Link Rewriting</h3><p>It is frequently the case that CSS files will include links to other files, such as background images, using the&#160;<code>url</code>() value syntax. Under 5.4, the URL for the CSS file and the targeted file be broken, due to the inclusions of the CSS file's content hash fingerprint. To fix this, Tapestry parses CSS files, locates the&#160;<code>url()</code> directives, and rewrites the URLs to be absolute (including the tar
 geted file's content hash fingerprint).</p><h3 id="Assets-PerformanceNotes">Performance Notes</h3><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important performance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html#Configuration-tapestry.gzipcompressionenabled">explicitly disable it</a>.</p><p><span style="line-height: 1.4285715;">Further, the asset will get a </span><em style="line-height: 1.4285715;">far future expires header</em><span style="line-height: 1.4285715;">, which will encourage the client browser to cache the asset.</span></p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed on
 ce the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html#Configuration-tapestry.applicationversion">version number</a>, to force existing clients to re-download all assets.</p><h3 id="Assets-AssetSecurity">Asset Security</h3>    <div class="aui-message problem shadowed information-macro">
+                            <span class="aui-icon icon-problem">Icon</span>
+                <div class="message-content">
+                            <p>This applies to how Tapestry 5.3 and earlier manage classpath assets; Tapestry 5.4 introduces another system which doesn't have this issue.</p>
+                    </div>
+    </div>
+<p>&#160;</p><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your Login page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious client copies the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicat
 e that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's contents. If the query parameter is absent, or doesn't match the actual file's content, the request is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the 
 file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</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="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
 {
     configuration.add(&quot;xyz&quot;);
 }
 ]]></script>
-</div></div><h2 id="Assets-MinimizingAssets">Minimizing Assets</h2><p>Since version 5.3, Tapestry provides a service, <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/assets/ResourceMinimizer.html">ResourceMinimizer</a>, which will help to minimize all your static resources (principally CSS and JavaScript files).</p><p>By default, this service does nothing. You should include a third-party library, for example the tapestry-yuicompressor project, which makes it possible to minimize CSS and JavaScript files.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
+</div></div>    <div class="aui-message problem shadowed information-macro">
+                            <span class="aui-icon icon-problem">Icon</span>
+                <div class="message-content">
+                            <p>Starting in Tapestry 5.4, there is a move to ensure that all assets are stored under&#160;<code>META-INF/assets</code>, rather than on the general classpath.</p><p>In Tapestry 5.5, assets on the general classpath will not be supported at all.</p>
+                    </div>
+    </div>
+<h3 id="Assets-MinimizingAssets">Minimizing Assets</h3><p>Since version 5.3, Tapestry provides a service, <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/assets/ResourceMinimizer.html">ResourceMinimizer</a>, which will help to minimize all your static resources (principally CSS and JavaScript files).</p><p>Minimization takes place before GZip compression. When aggregating JavaScript for a JavaScriptStack, the minimization is on the aggregated asset, not the individual assets being aggregated.</p><p>By default, this service does nothing. You should include a the tapestry-web-resources library, which makes it possible to minimize CSS and JavaScript files.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
-    &lt;artifactId&gt;tapestry-yuicompressor&lt;/artifactId&gt;
-    &lt;version&gt;5.3.1&lt;/version&gt;
+    &lt;artifactId&gt;tapestry-web-resources&lt;/artifactId&gt;
+    &lt;version&gt;5.4&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
 </div></div><p>By adding this dependency, all your JavaScript and CSS files will be minimized when <a shape="rect" href="configuration.html">PRODUCTION_MODE=true</a>. You can force the minimization of these files, by changing the value of the constant SymbolConstants.MINIFICATION_ENABLED in your module class (usually 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">

Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.