Package com.day.cq.commons.servlets
Class ProxyServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
com.day.cq.commons.servlets.ProxyServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig,OptingServlet
@SlingServlet(resourceTypes="nt:file",
extensions="html")
public class ProxyServlet
extends SlingSafeMethodsServlet
implements OptingServlet
Simple proxy servlet that include the request to a proxied resource.
Dispatches ".html" requests to a "nt:file" that have a "sling:resourceType"
property set on their "jcr:content" node, to the "jcr:content" resource.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(SlingHttpServletRequest request) Examines the request, and returntrueif this servlet is willing to handle the request.Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
getServletInfo, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, logMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
Constructor Details
-
ProxyServlet
public ProxyServlet()
-
-
Method Details
-
accepts
Examines the request, and returntrueif this servlet is willing to handle the request. Iffalseis returned, the request will be ignored by this servlet, and may be handled by other servlets.Does not proxy for request to a nt:file that have no sling:resource type set in the jcr:content node.
- Specified by:
acceptsin interfaceOptingServlet- Parameters:
request- The request to examine- Returns:
trueif this servlet will handle the request,falseotherwise
-