This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 5c84275  Automatic website deployment
5c84275 is described below

commit 5c8427590b74c7d1336a8d4e9ed78711954c3b3a
Author: jenkins <[email protected]>
AuthorDate: Thu Mar 12 15:38:03 2020 +0000

    Automatic website deployment
---
 .../the-sling-engine/url-to-script-resolution.html | 27 ++++++++++------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/documentation/the-sling-engine/url-to-script-resolution.html 
b/documentation/the-sling-engine/url-to-script-resolution.html
index 6c2149c..344ff35 100644
--- a/documentation/the-sling-engine/url-to-script-resolution.html
+++ b/documentation/the-sling-engine/url-to-script-resolution.html
@@ -128,7 +128,7 @@
 <p>See also <a href="/documentation/the-sling-engine/servlets.html">Servlets 
and Scripts</a> which provides detailed info about how to register servlets.</p>
 <p>First of all Sling looks up the resource identified by the URL - typically 
a path inside the JCR repository, which is annotated by the 
<code>sling:resourceType</code> property which defines the resource type of 
that resource. Using this resource type (which is kind of a relative path, eg. 
"myblog/comment"), scripts or servlets are looked up. For more details about 
how the initial resource is identified for a specific request URL look at <a 
href="/documentation/the-sling-engine/url-dec [...]
 <p>Scripts and servlets are itself resources in Sling and thus have a resource 
path: this is either the location in the JCR repository, the resource type in a 
servlet component configuration or the "virtual" bundle resource path (if a 
script is provided inside a bundle without being installed into the JCR 
repository). </p>
-<p>For the whole Truth about script resolution, see the <a 
href="https://github.com/apache/sling-org-apache-sling-servlets-resolver/blob/master/src/test/java/org/apache/sling/servlets/resolver/internal/helper/ScriptSelectionTest.java";>ScriptSelectionTest</a>
 class. If you see interesting cases that are not covered there, please let us 
know via the Sling users mailing list.</p>
+<p>For the whole Truth about script resolution, see the <a 
href="https://github.com/apache/sling-org-apache-sling-servlets-resolver/blob/master/src/test/java/org/apache/sling/servlets/resolver/internal/helper/ScriptSelectionTest.java";>ScriptSelectionTest</a>
 and <a 
href="https://github.com/apache/sling-org-apache-sling-servlets-resolver/blob/master/src/test/java/org/apache/sling/servlets/resolver/internal/helper/ResourceCollectorTest.java";>ResourceCollectorTest</a>
 classes. If you see in [...]
 <p>TODO: explain super types, servlet path mappings, node type resource types 
(<code>my:type -&gt; my/type</code>) </p>
 <h2><a href="#fundamental-scripts-and-servlets-are-equal" 
name="fundamental-scripts-and-servlets-are-equal">Fundamental: Scripts and 
Servlets are equal</a></h2>
 <p>In the following discussion, I will write about scripts. This will always 
include servlets as well. In fact, internally, Sling only handles with 
Servlets, whereas scripts are packed inside a Servlet wrapping and representing 
the script. </p>
@@ -158,25 +158,22 @@ while (type != null) {
     } 
 } 
 </code></pre>
-<h2><a href="#all-requests-are-not-equal" 
name="all-requests-are-not-equal">All requests are NOT equal</a></h2>
-<p>GET and HEAD request methods are treated differently than the other request 
methods. Only for GET and HEAD requests will the request selectors and 
extension be considered for script selection. For other requests the servlet or 
script name (without the script extension) must exactly match the request 
method. </p>
-<p>That is for a PUT request, the script must be PUT.esp or PUT.jsp. For a GET 
request with a request extension of html, the script name may be html.esp or 
GET.esp. </p>
-<h2><a href="#scripts-for-get-requests" 
name="scripts-for-get-requests">Scripts for GET requests</a></h2>
-<p>Apart for supporting scripts named after the request method, scripts 
handling GET and HEAD requests may be named differently for Sling to support a 
more elaborate processing order. </p>
+<h2><a href="#script-naming-conventions" 
name="script-naming-conventions">Script naming conventions</a></h2>
 <p>Depending on whether request selectors are considered, a script may have 
two forms: </p>
-<ul>
-  <li>a. Ignoring request selectors (e.g. there are none in the request URI) 
<code>{resourceTypeLabel}.{requestExtension}.{scriptExtension}</code></li>
-  <li>b. Handling request selectors 
<code>{selectorStringPath}.{requestExtension}.{scriptExtension}</code></li>
-</ul>
+<ol>
+  <li>Ignoring request selectors (e.g. there are none in the request URI): 
<code>{resourceTypeLabel}.{requestExtension}.{requestMethod}.{scriptExtension}</code></li>
+  <li>Handling request selectors: 
<code>{selectorStringPath}.{requestExtension}.{requestMethod}.{scriptExtension}</code></li>
+</ol>
 <p>The constituents of these script names are as follows: </p>
 <ul>
-  <li><code>{resourceTypeLabel}</code> - The last path segment of the path 
created from the resource type. This part is optional if the 
<code>{requestExtension}</code> is used in the script name. The resource type 
might either be set via the <code>sling:resourceType</code> property on the 
accessed node or if that property is not there its primary node type (property 
<code>jcr:primaryType</code>) is taken as fallback.</li>
-  <li><code>{requestExtension}</code> - The request extension. This part may 
be ommitted if the request extension is "html", otherwise this part is 
required. If this part is ommitted, the <code>{resourceTypeLabel}</code> is 
required in the case of ignoring the selectors.</li>
-  <li><code>{scriptExtension}</code> - The extension, e.g. "esp" or "jsp", 
identifying the scripting langauage used.</li>
+  <li><code>{resourceTypeLabel}</code> - The last path segment of the path 
created from the resource type. This part is optional if the 
<code>{requestExtension}</code> is used in the script name. The resource type 
might either be set via the <code>sling:resourceType</code> property on the 
accessed node or if that property is not there its primary node type (property 
<code>jcr:primaryType</code>) is taken as fall-back.</li>
+  <li><code>{requestExtension}</code> - The request extension. This part may 
be omitted if the request extension is <code>html</code>, otherwise this part 
is required. If this part is omitted, the <code>{resourceTypeLabel}</code> is 
required in the case of ignoring the selectors.</li>
+  <li><code>{requestMethod}</code> - The request's HTTP method. This part may 
be omitted if the script is meant for a <code>GET</code> or a <code>HEAD</code> 
request. This part is required for any other HTTP method.</li>
+  <li><code>{scriptExtension}</code> - The extension identifying the scripting 
language used. This part is mandatory. For more details about the available 
Script Engines and their registered extensions check the <a 
href="/documentation/bundles/scripting.html">Sling Scripting</a> page.</li>
   <li><code>{selectorStringPath}</code> - The selector string converted to a 
path, along the lines of <code>selectorString.replace(&#39;.&#39;, 
&#39;/&#39;)</code>. If less selectors are specified in the script name than 
given in the request, the script will only be taken into consideration if the 
given selectors are the <strong>first</strong> selectors in the request. This 
means <em>sel1/sel2.html.jsp</em> will be a candidate for the request url 
<em>/content/test.sel1.sel2.sel3.html</em [...]
 </ul>
 <h2><a href="#priority" name="priority">Priority</a></h2>
-<p>The rules for script path priorization is defined as follows: </p>
+<p>The rules for script path prioritization is defined as follows:</p>
 <ul>
   <li>The more request selectors are matched, the better</li>
   <li>A script including the request extension matches better than one without 
a request extension (for html only)</li>
@@ -202,7 +199,7 @@ while (type != null) {
             </div><footer class="footer">
                 <div class="content has-text-centered is-small">
 <div class="revisionInfo">
-                        Last modified by <span class="author">Robert 
Munteanu</span> on <span class="comment">Wed Nov 22 22:30:38 2017 +0200</span>
+                        Last modified by <span class="author">Radu 
Cotescu</span> on <span class="comment">Thu Mar 12 16:29:37 2020 +0100</span>
                     </div>                    <p>
                         Apache Sling, Sling, Apache, the Apache feather logo, 
and the Apache Sling project logo are trademarks of The Apache Software 
Foundation. All other marks mentioned may be trademarks or registered 
trademarks of their respective owners.
                     </p><p>

Reply via email to