@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 javax.servlet.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(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse res) |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logpublic boolean accepts(SlingHttpServletRequest request)
OptingServlettrue 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 OptingServletrequest - The request to examinetrue if this servlet will handle the request,
false otherwisepublic void service(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
service in interface javax.servlet.Servletservice in class javax.servlet.GenericServletjavax.servlet.ServletExceptionjava.io.IOExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved