This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch bugfix/clarify-resource-path-for-non-existing-resource in repository https://gitbox.apache.org/repos/asf/sling-site.git
commit 7a52dffe432506acd26c110b1836f27bfd0035c7 Author: Konrad Windszus <[email protected]> AuthorDate: Fri Nov 28 13:45:54 2025 +0100 SLING-12978 clarify resource path for non-existing resources. --- .../jbake/content/documentation/the-sling-engine/url-decomposition.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/jbake/content/documentation/the-sling-engine/url-decomposition.md b/src/main/jbake/content/documentation/the-sling-engine/url-decomposition.md index a8eb30673..b210d48ca 100644 --- a/src/main/jbake/content/documentation/the-sling-engine/url-decomposition.md +++ b/src/main/jbake/content/documentation/the-sling-engine/url-decomposition.md @@ -10,7 +10,8 @@ tags=core,urls During the *Resource Resolution* step, the client request URI (as being returned by [HttpServletRequest.getRequestURI()](https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getRequestURI())) is decomposed into the following parts (in exactly this order): 1. **Resource Path** - For existing resources the resource path is the longest match (also considering its [mappings](/documentation/the-sling-engine/mappings-for-resource-resolution.html)) pointing to a resource where the next character is either a dot (`.`) or it is the full request URI. -Otherwise (for a path not matching any existing resource) the resource path ends at the *first dot (`.`)* in the request url. The exact logic for retrieving the resource path is implemented at [ResourceResolver.resolve(HttpServletRequest, String)](https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#resolve-javax.servlet.http.HttpServletRequest-java.lang.String-) called from `org.apache.sling.engine.impl.request.RequestData.initResource()` with th [...] +Otherwise (for a path not matching any existing resource) this contains the +*full request URI* (including extensions, selectors and suffix if existing). The exact logic for retrieving the resource path is implemented at [ResourceResolver.resolve(HttpServletRequest, String)](https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#resolve-javax.servlet.http.HttpServletRequest-java.lang.String-) called from `org.apache.sling.engine.impl.request.RequestData.initResource()` with the 2nd argument being the request path. *It is imp [...] 1. **Selectors** - If the first character in the request URL after the resource path is a dot (`.`), the string after the dot up to but not including the last dot before the next slash character or the end of the request URL comprises the selectors. If the resource path spans the complete request URL no selectors exist. If only one dot follows the resource path before the end of the request URL or the next slash, also no selectors exist. 1. **Extension** - The string after the last dot after the resource path in the request URL but before the end of the request URL or the next slash after the resource path in the request URL is the extension. 1. **Suffix** - If the request URL contains a slash character after the resource path and optional selectors and extension, the path starting with the slash up to the end of the request URL is the suffix path. Otherwise, the suffix path is empty. Note, that after the resource path at least a dot must be in the URL to let Sling detect the suffix.
