Processing Sling Request without the "sling.servlet.selectors"
Hi,
I want to process Servlet without the "sling.servlet.selectors", e.g. process the request with an empty selector.
Here is my current code that works with selector.
@Component(immediate = true, metatype = false) @Service(value = javax.servlet.Servlet.class) @Properties({ @Property(name = Constants.SERVICE_DESCRIPTION, value = "Test"), @Property(name = Constants.SERVICE_VENDOR, value = OsgiServiceProperties.SERVICE_VENDOR), @Property(name = "sling.servlet.methods", value = {"GET" }), @Property(name = "sling.servlet.extensions", value = { "xml" }), @Property(name = "sling.servlet.selectors", value = { "foo" }) }) public class TestServlet extends PageServlet { // PageServlet == SlingSafeMethodsServlet with some improvements ... @Override protected final void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { response.getWriter().print("I have been invoked.."); } }
Works fine but, when I remove the @Property(name = "sling.servlet.selectors", value = { "foo" }) the Servlet stops working. What property/setting should I use to process empty selector ?
Thanks in advance,
Peter
