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:
java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProxyServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(SlingHttpServletRequest request)
Examines the request, and returntrue
if this servlet is willing to handle the request.-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
getServletInfo, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
-
-
-
Method Detail
-
accepts
public boolean accepts(SlingHttpServletRequest request)
Examines the request, and returntrue
if this servlet is willing to handle the request. Iffalse
is 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:
accepts
in interfaceOptingServlet
- Parameters:
request
- The request to examine- Returns:
true
if this servlet will handle the request,false
otherwise
-
-