Class RoutingFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class RoutingFilter
    extends Object
    implements javax.servlet.Filter
    Decides how to route an incoming URL into the XWiki system. There are various possibilities:
    • If there's a registered component of type ResourceReferenceHandler matching the ResourceType passed in the URL (for example when using the standard URL scheme, the Resource Type is the segment path just after the Context Path, i.e. bin in http://<server>/xwiki/bin/view/Space/Page), then the resourceReferenceHandler Servlet is called to handle it.
    • If not, then continue executing the rest of the web.xml file, thus bridging to the old system, including the existing Struts Action Servlet.
    As time progresses it is expected that more and more Resource Types will have registered ResourceReferenceHandler.
    Since:
    7.1M1
    Version:
    $Id: 96683321275ac73c48f55d2b6bacc0b11529406a $
    • Constructor Detail

      • RoutingFilter

        public RoutingFilter()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        IOException
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter