> On Thu, Jul 30, 2009 at 6:09 PM, Vidar Ramdal <[email protected]> wrote: > >> What is the intended behavior for a servlet that is registered as follows: >> * @scr.property name="sling.servlet.extensions" value="html" >> * @scr.property name="sling.servlet.resourceTypes" >> value="sling/servlet/default" >> * @scr.property name="sling.servlet.methods" values.0="GET" >> values.1="POST" >> >> It seems that "sling.servlet.extensions" is ignored, so that this >> servlet will respond to any extension, if there is no better match. >> From the docs [1] and [2] it is a little unclear what is supposed to >> happen, so it might not be a bug, but it still seems strange.
2009/7/31 Dominik Süß <[email protected]>: > did you give the Javaannotations a try (@SlingServlet [1]), we currently > only work with those instead of QDox and if I remember right I've seen a > testcomponent with the selectors which worked. The SlingServlet annotation > can be found in the felix scr annotations. No, I used only the old-fashioned Javadoc method, but should that make a difference? Also, I see that if I drop the "sling.servlet.extensions" property, the servlet seems to be registered as expected: * @scr.property name="sling.servlet.extensions" value="html" * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default" But with "sling.servlet.extensions" set to the array of GET and POST, the servlet responds to requests without the extension: * @scr.property name="sling.servlet.extensions" value="html" * @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default" * @scr.property name="sling.servlet.methods" values.0="GET" values.1="POST" This seems like a bug to me. I'll file a JIRA for it, if nobody believes behavior this is intentional. > [1] https://issues.apache.org/jira/browse/SLING-902 >> [1] http://cwiki.apache.org/confluence/display/SLING/URL+to+Script+Resolution >> [2] http://sling.apache.org/site/servlet-resolution.html -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway +47 21 531941, ext 2070
