Author: buildbot
Date: Sat Nov 26 11:40:19 2016
New Revision: 1001672

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    
websites/staging/sling/trunk/content/documentation/the-sling-engine/servlets.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Nov 26 11:40:19 2016
@@ -1 +1 @@
-1771466
+1771468

Modified: 
websites/staging/sling/trunk/content/documentation/the-sling-engine/servlets.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/the-sling-engine/servlets.html
 (original)
+++ 
websites/staging/sling/trunk/content/documentation/the-sling-engine/servlets.html
 Sat Nov 26 11:40:19 2016
@@ -144,11 +144,7 @@ to a script or and servlet.</p>
 <tbody>
 <tr>
 <td><code>sling.servlet.paths</code></td>
-<td>A list of absolute paths under which the servlet is accessible as a 
Resource. The property value must either be a single String, an array of 
Strings or a Vector of Strings.<br>A servlet using this property might be 
ignored unless its path is included in the <em>Execution Paths</em> 
(<code>servletresolver.paths</code>) configuration setting of the 
<code>SlingServletResolver</code> service. Either this property or the 
<code>sling.servlet.resourceTypes</code> property must be set, or the servlet 
is ignored. If both are set, the servlet is registered using both ways.</td>
-</tr>
-<tr>
-<td><br>Creating a resource at the desired path, with a resource type that 
maps to a servlet, provides the same result in most cases while taking 
advantage of more Sling built-in features.</td>
-<td></td>
+<td>A list of absolute paths under which the servlet is accessible as a 
Resource. The property value must either be a single String, an array of 
Strings or a Vector of Strings.<br>A servlet using this property might be 
ignored unless its path is included in the <em>Execution Paths</em> 
(<code>servletresolver.paths</code>) configuration setting of the 
<code>SlingServletResolver</code> service. Either this property or the 
<code>sling.servlet.resourceTypes</code> property must be set, or the servlet 
is ignored. If both are set, the servlet is registered using both 
ways.<br>Creating a resource at the desired path, with a resource type that 
maps to a servlet, provides the same result in most cases while taking 
advantage of more Sling built-in features.</td>
 </tr>
 <tr>
 <td><code>sling.servlet.resourceTypes</code></td>
@@ -175,7 +171,7 @@ to a script or and servlet.</p>
 <p>A <code>SlingServletResolver</code> listens for <code>Servlet</code> 
services and - given the correct service registration properties - provides the 
servlets as resources in the (virtual) resource tree. Such servlets are 
provided as <code>ServletResource</code> instances which adapt to the 
<code>javax.servlet.Servlet</code> class.</p>
 <p>For a Servlet registered as an OSGi service to be used by the Sling Servlet 
Resolver, either one or both of the <code>sling.servlet.paths</code> or the 
<code>sling.servlet.resourceTypes</code> service reference properties must be 
set. If neither is set, the Servlet service is ignored.</p>
 <p>Each path to be used for registration - either from the 
<code>sling.servlet.paths</code> property or constructed from the other 
<code>sling.servlet.\*</code> properties - must be absolute. Any relative path 
is made absolute by prefixing it with a root path. This prefix may be set with 
the <code>sling.servlet.prefix</code> service registration property. If this 
property is not set, the first entry in the <code>ResourceResolver</code> 
search path for the <code>ResourceResolver.getResource(String)</code> method is 
used as the prefix. If this entry cannot be derived, a simpe slash - 
<code>/</code> - is used as the prefix.</p>
-<p>If <code>sling.servlet.methods</code> is not specified, the servlet is only 
registered for handling GET requests. Make sure to list all methods you want to 
be handled by this servlet.</p>
+<p>If <code>sling.servlet.methods</code> is not specified, the servlet is only 
registered for handling GET and HEAD requests. Make sure to list all methods 
you want to be handled by this servlet.</p>
 <h4 id="registering-a-servlet-using-java-annotations">Registering a Servlet 
using Java Annotations<a class="headerlink" 
href="#registering-a-servlet-using-java-annotations" title="Permanent 
link">&para;</a></h4>
 <p>If you are working with the default Apache Sling development stack you can 
use Java Annotations from <a 
href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin.html";>Apache
 Felix Maven SCR Plugin</a> to register your Sling
 servlets and describe their binding details.</p>
@@ -255,7 +251,7 @@ servlets and describe their binding deta
 <li><code>&lt;prefix&gt;/sling/unused/tab/json</code></li>
 </ul>
 <p>As explained the Servlet is registered for each permutation of the resource 
types, selectors and extension. See above at the explanation of 
<code>sling.servlet.prefix</code> how <code>&lt;prefix&gt;</code> is 
defined.</p>
-<p>It is more common to register for absolute resource types or at least 
explicitly define <code>sling.servlet.prefix</code> as well, because otherwise 
you are in most cases not sure, under which absolute path the servlet is in the 
end registered (and by which
+<p>It is more common to register for absolute resource types or at least 
explicitly define <code>sling.servlet.prefix</code> as well, because otherwise 
you are in most cases not sure under which absolute path the Servlet is 
registered (and therefore by which
 other paths it might get overwritten).</p>
 <h3 id="servlet-lifecycle-issues">Servlet Lifecycle Issues<a 
class="headerlink" href="#servlet-lifecycle-issues" title="Permanent 
link">&para;</a></h3>
 <p>The Servlet API specification states the following with respect to the life
@@ -295,7 +291,7 @@ The mechanism helping the provider here
 <h2 id="error-handler-servlets-or-scripts">Error Handler Servlet(s) or 
Scripts<a class="headerlink" href="#error-handler-servlets-or-scripts" 
title="Permanent link">&para;</a></h2>
 <p>Error handling support is described on the <a 
href="/documentation/the-sling-engine/errorhandling.html">Errorhandling</a> 
page.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
-        Rev. 1771466 by kwin on Sat, 26 Nov 2016 11:34:31 +0000
+        Rev. 1771468 by kwin on Sat, 26 Nov 2016 11:40:10 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to