Author: rombert Date: Thu Mar 23 09:31:03 2017 New Revision: 1788210 URL: http://svn.apache.org/viewvc?rev=1788210&view=rev Log: SLING-6699 - Clearly describe drawbacks of mounting servlets by path
Minor layout tweaks 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=1788210&r1=1788209&r2=1788210&view=diff ============================================================================== --- sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext (original) +++ sling/site/trunk/content/documentation/the-sling-engine/servlets.mdtext Thu Mar 23 09:31:03 2017 @@ -11,7 +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>Binding resources by paths is discouraged, see [caveats when binding servlets by path](#caveats-when-binding-servlets-by-path] below. | +| `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>Binding resources by paths is discouraged, see [caveats when binding servlets by path](#caveats-when-binding-servlets-by-path) below. | | `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`. | @@ -37,7 +37,7 @@ Binding servlets by paths has several di Given these drawbacks it is strongly recommended to bind servlets to resource types rather than paths. -#### Registering a Servlet using Java Annotations +### Registering a Servlet using Java Annotations If you are working with the default Apache Sling development stack you can either use