You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/03/12 16:21:07 UTC

[sling-site] branch master updated: SLING-9176 - document the new sling.servlet.paths.strict option, and move both paths.* properties further down the table in order to give more weight to the other preferred options

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 223fc33  SLING-9176 - document the new sling.servlet.paths.strict option, and move both paths.* properties further down the table in order to give more weight to the other preferred options
223fc33 is described below

commit 223fc3365f4913ed9293b0dbe0da5222d979feb9
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Mar 12 17:19:35 2020 +0100

    SLING-9176 - document the new sling.servlet.paths.strict option, and move both paths.* properties further down the table in order to give more weight to the other preferred options
---
 src/main/jbake/content/documentation/the-sling-engine/servlets.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/jbake/content/documentation/the-sling-engine/servlets.md b/src/main/jbake/content/documentation/the-sling-engine/servlets.md
index 4e0d455..1bf139d 100644
--- a/src/main/jbake/content/documentation/the-sling-engine/servlets.md
+++ b/src/main/jbake/content/documentation/the-sling-engine/servlets.md
@@ -15,12 +15,13 @@ Servlets can be registered as OSGi services. The following service reference pro
 
 | 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 ignor [...]
 | `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.resourceSuperType` | The resource super type, indicating which previously registered servlet could intercept the request if the request matches the resource super type better. The property value must be a single String. This property is only considered for the registration with `sling.servlet.resourceTypes`. (since version `2.3.0` of the `org.apache.sling.api.servlets` API, version `2.5.2` of the `org.apache.sling.servlets.resolver` bundle)|
 | `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>. In case this is not empty the first selector(s) (i.e. the one(s) on the left) in the request URL must match, otherwise the servlet is not executed. After that may follow arbitrarily many non-registered selectors. The property value must either be a single String, an ar [...]
 | `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`. |
 | `sling.servlet.methods` | The request methods supported by the servlet. 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`. If this property is missing, the value defaults to GET and HEAD, regardless of which methods are actually implemented/handled by the servlet. A value of `*` leads to a servlet being bound to all methods. |
+| `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 ignor [...]
+| `sling.servlet.paths.strict` | When set to `true`, this enables _strict_ selection mode for servlets bound by path. In this mode, the above `.extensions`, `.selectors` and `.methods` service properties are taken into account to select such servlets. <br> If this property is not set to `true` the behavior is unchanged from previous versions and only the `.paths` property is considered when selecting such servlets. <br>See the [ServletSelectionIT](https://github.com/apache/sling-org-apac [...]
 | `sling.servlet.prefix` | The prefix or numeric index to make relative paths absolute. If the value of this property is a number (int), it defines the index of the search path entries from the resource resolver to be used as the prefix. The defined search path is used as a prefix to mount this servlet. The number can be -1 which always points to the last search entry. If the specified value is higher than than the highest index of the search paths, the last entry is used. The index star [...]
 | `sling.core.servletName` | The name with which the servlet should be registered. This registration property is optional. If one is not explicitly set, the servlet's name will be determined from either the property `component.name`, `service.pid` or `service.id` (in that order). This means that the name is always set (as at least the last property is always ensured by OSGi).