[ 
https://issues.apache.org/jira/browse/SLING-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182440#comment-13182440
 ] 

Carsten Ziegeler commented on SLING-2191:
-----------------------------------------

As noted in the email thread:

I'm not sure if we really should change this :)
OptingServlet should be an exception and not the default case of
handling requests. Remember for example that as soon as you're using
an opting servlet, the resolution can't be cached.

So for the use case at hand I would rather go with a special
dispatching option servlet than extending our already complicated
resolution mechanism.

In addition, servlets - regardless if they are option servlets or not - are 
mounted in the resource tree. If two of them use the same mount information, 
they end up at the same node in the tree. So one of them wins. This definitely 
makes sense for non opting servlets.
For opting servlets one might consider this here a valid use case, but on the 
other hand option servlets should be avoided anyway as they reduce performance 
- which might not be that important for posts

However, if you just have two servlets, you can use the property 
"sling.servlet.prefix" setting it to 0 for one of the servlets and 1 for the 
other. This basically means one of the servlets is virtually mounted beneath 
/libs and the other at /apps.
                
> Allow multiple OptingServletS for the same resource type
> --------------------------------------------------------
>
>                 Key: SLING-2191
>                 URL: https://issues.apache.org/jira/browse/SLING-2191
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Reto Bachmann-Gmür
>         Attachments: SLING-2191-tests-launchpad.patch
>
>
> It should be possible to have multiple OptinServlets (accepting different 
> sets of requests) for the same resource type.

--
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


Reply via email to