Author: kwin
Date: Sat Nov 26 11:40:10 2016
New Revision: 1771468

URL: http://svn.apache.org/viewvc?rev=1771468&view=rev
Log:
SLING-6249 some more fixes to the servlet documentation

Modified:
    sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext

Modified: 
sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext?rev=1771468&r1=1771467&r2=1771468&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext 
(original)
+++ sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext Sat 
Nov 26 11:40:10 2016
@@ -11,8 +11,7 @@ Servlets can be registered as OSGi servi
 
 | Name | Description |
 |--|--|
-| `sling.servlet.paths` | 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 *Execution Paths* 
(`servletresolver.paths`) configuration setting of the `SlingServletResolver` 
service. Either this property or the `sling.servlet.resourceTypes` 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.|
+| `sling.servlet.paths` | 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 *Execution Paths* 
(`servletresolver.paths`) configuration setting of the `SlingServletResolver` 
service. Either this property or the `sling.servlet.resourceTypes` 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.|
 | `sling.servlet.resourceTypes` | The resource type(s) supported by the 
servlet. The property value must either be a single String, an array of Strings 
or a Vector of Strings. Either this property or the `sling.servlet.paths` 
property must be set, or the servlet is ignored. If both are set, the servlet 
is registered using both ways. |
 | `sling.servlet.selectors` | The request URL selectors supported by the 
servlet. The selectors must be configured as they would be specified in the URL 
that is as a list of dot-separated strings such as <em>print.a4</em>. The 
property value must either be a single String, an array of Strings or a Vector 
of Strings. This property is only considered for the registration with 
`sling.servlet.resourceTypes`. |
 | `sling.servlet.extensions` | The request URL extensions supported by the 
servlet for requests. The property value must either be a single String, an 
array of Strings or a Vector of Strings. This property is only considered for 
the registration with `sling.servlet.resourceTypes`. |
@@ -25,7 +24,7 @@ For a Servlet registered as an OSGi serv
 
 Each path to be used for registration - either from the `sling.servlet.paths` 
property or constructed from the other `sling.servlet.\*` properties - must be 
absolute. Any relative path is made absolute by prefixing it with a root path. 
This prefix may be set with the `sling.servlet.prefix` service registration 
property. If this property is not set, the first entry in the 
`ResourceResolver` search path for the `ResourceResolver.getResource(String)` 
method is used as the prefix. If this entry cannot be derived, a simpe slash - 
`/` \- is used as the prefix.
 
-If `sling.servlet.methods` 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.
+If `sling.servlet.methods` 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.
 
 #### Registering a Servlet using Java Annotations
 
@@ -111,10 +110,9 @@ A Servlet service registered with these
 
 As explained the Servlet is registered for each permutation of the resource 
types, selectors and extension. See above at the explanation of 
`sling.servlet.prefix` how `<prefix>` is defined.
 
-It is more common to register for absolute resource types or at least 
explicitly define `sling.servlet.prefix` 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
+It is more common to register for absolute resource types or at least 
explicitly define `sling.servlet.prefix` 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).
 
-
 ### Servlet Lifecycle Issues
 
 The Servlet API specification states the following with respect to the life


Reply via email to