You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/05/15 21:31:00 UTC

svn commit: r406723 - in /cocoon/trunk/core/cocoon-webapp: pom.xml src/main/webapp/sitemap.xmap

Author: cziegeler
Date: Mon May 15 12:30:59 2006
New Revision: 406723

URL: http://svn.apache.org/viewcvs?rev=406723&view=rev
Log:
Fix typo
Add missing resource matcher to main sitemap

Modified:
    cocoon/trunk/core/cocoon-webapp/pom.xml
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap

Modified: cocoon/trunk/core/cocoon-webapp/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-webapp/pom.xml?rev=406723&r1=406722&r2=406723&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/pom.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/pom.xml Mon May 15 12:30:59 2006
@@ -107,6 +107,11 @@
       <artifactId>cocoon-fop-sample</artifactId>
       <version>1.0.0-SNAPSHOT</version>
     </dependency>    
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-template-impl</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>    
   </dependencies>
   
   <pluginRepositories>

Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap?rev=406723&r1=406722&r2=406723&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/sitemap.xmap Mon May 15 12:30:59 2006
@@ -269,6 +269,38 @@
     -->
 
     <!--+
+        | Cocoon-provided client-side resources.
+        | Some block's jar files (e.g. Ajax & Forms) include client-side resources
+        | such as JavaScript, CSS and images. The system-level pattern below
+        | fetches these resources, while allowing them to be overridden if needed
+        | in the webapp's "resources" directory.
+        |
+        | Defining this pattern in the root sitemap avoids duplicating it in subsitemaps,
+        | which reduces copy/pasting in application code and allows better client-side
+        | caching by giving each resource a single URL.
+        |
+        | Furthermore, some Cocoon code such as the Forms-provided XSLs assume that
+        | resources are available at that URL.
+        |
+        | The absolute path for these resources is "{request:contextPath}/_cocoon/resources"
+        +-->
+    <map:match pattern="_cocoon/resources/*/**">
+	  <map:select type="resource-exists">
+		<map:when test="resources/{1}/{2}">
+		  <map:read src="resources/{1}/{2}"/>
+		</map:when>
+		<!-- For Cocoon development, read directly from source directories
+                <map:when test="../../src/blocks/{1}/java/org/apache/cocoon/{1}/resources/{2}">
+                  <map:read src="../../src/blocks/{1}/java/org/apache/cocoon/{1}/resources/{2}"/>
+	        </map:when>
+		-->
+		<map:otherwise>
+		  <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"/>
+		</map:otherwise>
+	  </map:select>
+	</map:match>
+
+    <!--+
         | Mount everything else by calling the sitemap.xmap file located
         | in the requested folder.
         +-->