[
https://issues.apache.org/jira/browse/SLING-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415227#comment-13415227
]
Tyson Norris commented on SLING-2533:
-------------------------------------
I would summarize the problem here is exposed by the need to select alternate
rendering scripts, in this case via sling:include.
For example, alternate scripts can be selected by specifying an extension or
selector in the url, but using sling:include, the selector specified is ignored
when no extension is specified...
Maybe if this is conceptually illegal, could sling:include should be able to
override/add an extension, in the same way that it can add/override selectors.
Would specifying the extension in sling:include be tolerable?
> ResourceCollector fails to resolve selector scripts when no extension is used
> -----------------------------------------------------------------------------
>
> Key: SLING-2533
> URL: https://issues.apache.org/jira/browse/SLING-2533
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.1.2
> Environment: this applies to version 2.1.3-SNAPSHOT
> Reporter: Tyson Norris
> Attachments: sling-2533.patch
>
>
> A specific use case where this comes up is:
> request: http://localhost:4502/content/test/include
> In JCR repo:
> - node at content/test/include has sling:resourceType=test/main
> - script to render this resource is /apps/test/main/GET.jsp
> - script to render different type with selector referneced via:
> <sling:include resourceType="test/sometype" replaceSelectors="special"/>
> - script to render the different type is /apps/test/sometype/special.jsp
> in this case, special.jsp script is only resoved if renamed to special.GET.jsp
> Note that:
> - no extension on requested URL
> - using a replaced selector in sling:include should behave similar to
> specifying an exentsion when the extension is null, I think.
> See attached patch to ResourceCollector and ScriptSelectionTest
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira