code: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
      throws IOException, ServletException {
  
          if (m_isInitialized || tryToInitialize()) {
              if (request instanceof HttpServletRequest) {
                  HttpServletRequest req = (HttpServletRequest)request;
                  String uri = req.getRequestURI();
                  if (!uri.matches(m_regex)) {
                      String adjustedUri = uri.replaceFirst(m_contextPath + "/", m_servletPath);
                      req.getRequestDispatcher(adjustedUri).forward(request, response);
                      return;
                  }
              }
          }
          chain.doFilter(request, response);
      }
docs: Adjusts the requested URIs by prepending the name of the {@link org.opencms.main.OpenCmsServlet},
  if the request should be handled by that servlet.
  
  @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)