Class 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 Detail

      • ProxyServlet

        public ProxyServlet()
    • Method Detail

      • accepts

        public boolean accepts​(SlingHttpServletRequest request)
        Examines the request, and return 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.

        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 interface OptingServlet
        Parameters:
        request - The request to examine
        Returns:
        true if this servlet will handle the request, false otherwise