You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2016/04/19 18:12:53 UTC

svn commit: r986096 - in /websites/staging/sling/trunk/content: ./ documentation/the-sling-engine/mappings-for-resource-resolution.html

Author: buildbot
Date: Tue Apr 19 16:12:53 2016
New Revision: 986096

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/the-sling-engine/mappings-for-resource-resolution.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Apr 19 16:12:53 2016
@@ -1 +1 @@
-1739954
+1739956

Modified: websites/staging/sling/trunk/content/documentation/the-sling-engine/mappings-for-resource-resolution.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/the-sling-engine/mappings-for-resource-resolution.html (original)
+++ websites/staging/sling/trunk/content/documentation/the-sling-engine/mappings-for-resource-resolution.html Tue Apr 19 16:12:53 2016
@@ -114,6 +114,31 @@ h2:hover > .headerlink, h3:hover > .head
   visibility: hidden;
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="toc">
+<ul>
+<li><a href="#configuration">Configuration</a><ul>
+<li><a href="#properties">Properties</a></li>
+<li><a href="#node-types">Node Types</a></li>
+</ul>
+</li>
+<li><a href="#namespace-mangling">Namespace Mangling</a></li>
+<li><a href="#root-level-mappings">Root Level Mappings</a><ul>
+<li><a href="#mapping-entry-specification">Mapping Entry Specification</a></li>
+<li><a href="#regular-expression-matching">Regular Expression Matching</a><ul>
+<li><a href="#regular-expressions-for-reverse-mappings">Regular Expressions for Reverse Mappings</a></li>
+</ul>
+</li>
+<li><a href="#redirection-values">Redirection Values</a></li>
+</ul>
+</li>
+<li><a href="#resource-tree-access">Resource Tree Access</a><ul>
+<li><a href="#drilling-down-the-resource-tree">Drilling Down the Resource Tree</a></li>
+</ul>
+</li>
+<li><a href="#rebuild-the-vanity-bloom-filter">Rebuild The Vanity Bloom Filter</a></li>
+<li><a href="#debugging-issues">Debugging Issues</a></li>
+</ul>
+</div>
 <h2 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h2>
 <h3 id="properties">Properties<a class="headerlink" href="#properties" title="Permanent link">&para;</a></h3>
 <p>The mapping of request URLs to resources is mainly configured in a configuration tree which is (by default) located below <code>/etc/map</code>. The actual location can be configured with the <code>resource.resolver.map.location</code> property of the <code>org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl</code> configuration.
@@ -141,7 +166,7 @@ That way you can even make it <a href="/
 <p>Conversely the <code>resolve</code> methods must undo such namespace mangling to get back at the resource path. This is simple done by modifying any path such that segments starting with an underscore enclosed prefix are changed by removing the underscores and adding a colon after the prefix. There is one catch, tough: Due to the way the SlingPostServlets automatically generates names, there may be cases where the actual name would be matching this mechanism. Therefore only prefixes are modified which are actually namespace prefixes.</p>
 <p><em>Example</em>: The path <code>/content/*a*sample/*jcr*content/*jcr*data.png{*</code>} <em>is modified by namespace mangling in the</em> <code>{*}resolve{*</code>} <em>method to get</em> <code>*/content/*a*sample/jcr:content/jcr:data.png{*}{</code>}<em>. The prefix</em> <code>*\*a{*}{</code>}<code>{</code>} is not modified because there is no registered namespace with prefix <code>a</code>. On the other hand the prefix <code>{*}jcr{*</code>} is modified because there is of course a registered namespace with prefix <code>jcr</code>.</p>
 <h2 id="root-level-mappings">Root Level Mappings<a class="headerlink" href="#root-level-mappings" title="Permanent link">&para;</a></h2>
-<p>Root Level Mappings apply to the request at large including the scheme, host.port and uri path. To accomplish this a path is constructed from the request as <code>\{scheme\}/\{host.port\}/\{uri_path\</code>}. This string is then matched against mapping entries below <code>/etc/map</code> which are structured in the content analogously. The longest matching entry string is used and the replacement, that is the redirection property, is applied.</p>
+<p>Root Level Mappings apply to the request at large including the scheme, host, port and uri path. To accomplish this a path is constructed from the request lik this <code>{scheme}/{host}.{port}/{uri_path}</code>. This string is then matched against mapping entries below <code>/etc/map</code> which are structured in the content analogously. The longest matching entry string is used and the replacement, that is the redirection property, is applied.</p>
 <h3 id="mapping-entry-specification">Mapping Entry Specification<a class="headerlink" href="#mapping-entry-specification" title="Permanent link">&para;</a></h3>
 <p>Each entry in the mapping table is a regular expression, which is constructed from the resource path below <code>/etc/map</code>. If any resource along the path has a <code>sling:match</code> property, the respective value is used in the corresponding segment instead of the resource name. Only resources either having a <code>sling:redirect</code> or <code>sling:internalRedirect</code> property are used as table entries. Other resources in the tree are just used to build the mapping structure.</p>
 <p><em>Example</em></p>
@@ -373,9 +398,9 @@ The bloom filter is handled automaticall
 <li>start Apache Sling (this might take few minutes, depending on how many vanity path entries are present)</li>
 </ul>
 <h2 id="debugging-issues">Debugging Issues<a class="headerlink" href="#debugging-issues" title="Permanent link">&para;</a></h2>
-<p>Use the Felix Web Console Plugin provided at <code>/system/console/jcrresolver</code> to inspect both the mapping and the resolver map entries. Also you can check that what either <code>ResourceResolver.map(...)</code> or <code>ResourceResolver.resolve(...)</code> would return for a given URL/path.</p>
+<p>Use the Felix Web Console Plugin provided at <code>/system/console/jcrresolver</code> to inspect both the mapping and the resolver map entries. Also you can check what either <code>ResourceResolver.map(...)</code> or <code>ResourceResolver.resolve(...)</code> would return for a given URL/path.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1739954 by kwin on Tue, 19 Apr 2016 16:04:39 +0000
+        Rev. 1739956 by kwin on Tue, 19 Apr 2016 16:12:44 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project