@SlingServlet(paths={"/apps/sling/nonexisting/GET.servlet","/apps/sling/nonexisting/POST.servlet","/apps/sling/nonexisting/PUT.servlet"}) @Reference(name="Servlet", referenceInterface=NonExistingResourceServlet.class, policy=DYNAMIC, cardinality=OPTIONAL_MULTIPLE) public class NonExistingDispatcherServlet extends GenericServlet implements OptingServlet
Please note: This is a temporary solution until Sling provides a built-in mechanism for this use case. Not to be used by client implementations!
Constructor and Description |
---|
NonExistingDispatcherServlet() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(SlingHttpServletRequest request)
Examines the request, and return
true if this servlet is
willing to handle the request. |
void |
service(ServletRequest request,
ServletResponse res) |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, getServletConfig, getServletInfo, init
public boolean accepts(SlingHttpServletRequest request)
OptingServlet
true
if this servlet is
willing to handle the request. If false
is returned, the
request will be ignored by this servlet, and may be handled by other
servlets.accepts
in interface OptingServlet
request
- The request to examinetrue
if this servlet will handle the request,
false
otherwisepublic void service(ServletRequest request, ServletResponse res) throws ServletException, java.io.IOException
service
in interface Servlet
service
in class GenericServlet
ServletException
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved