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

Konrad Windszus commented on SLING-6249:
----------------------------------------

For me all those constants are public API and therefore potentially interesting 
to consumers. They are documented at 
https://sling.apache.org/documentation/the-sling-engine/errorhandling.html and 
https://sling.apache.org/documentation/the-sling-engine/servlets.html#default-servlets.
If I e.g. want to bind my servlet to any resource type with a specific 
extension I need to use {{DEFAULT_SERVLET_NAME}}. The same for 
{{ERROR_HANDLER_PATH}}. I am just not sure about {{SLING_SERLVET_NAME}}. Except 
for the typo in the constant name it is also unclear what it is good for. I 
personally never used it or felt the need to overwrite the name. Where in the 
system are the servlet names exposed? I only understand how that could be 
relevant for classical servlet programming leveraging web.xmls 
(http://stackoverflow.com/questions/20073905/why-do-we-need-a-servlet-name).

> Move ServletResolverConstants to an exported package
> ----------------------------------------------------
>
>                 Key: SLING-6249
>                 URL: https://issues.apache.org/jira/browse/SLING-6249
>             Project: Sling
>          Issue Type: Improvement
>    Affects Versions: Servlets Resolver 2.4.6
>            Reporter: Konrad Windszus
>
> The constants being defined in 
> {{o.a.s.servlets.resolver.internal.ServletResolverConstants}} are not only 
> useful for the servlet resolver bundle itself but basically for every Sling 
> Servlet being defined without the custom Felix SCR annotations. Therefore it 
> would be good to move that to a package which is exported (and therefore part 
> of the public API). Although in reality all constant Strings are inline in 
> Java (which means that there should never be a runtime dependency towards 
> that class) it does not even appear in 
> http://sling.apache.org/apidocs/sling7/ nor in 
> https://sling.apache.org/apidocs/sling7/constant-values.html. Also the 
> constants are not part of the uber-jar being generated for the Sling API as 
> well for AEM 
> (https://docs.adobe.com/docs/en/aem/6-1/develop/dev-tools/ht-projects-maven.html#What%20is%20the%20UberJar?).
> This was first requested in 
> http://www.mail-archive.com/[email protected]/msg45467.html and became 
> more important with the advent of OSGi 6 component annotations (see also 
> FELIX-5396).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to