Package javax.servlet

Examples of javax.servlet.Filter.doFilter()


        } else if (target instanceof Servlet) {
            Servlet servlet = (Servlet) target;
            servlet.service(request, response);
        } else if (target instanceof Filter) {
            Filter filter = (Filter) target;
            filter.doFilter(request, response, filterChain);
        } else {
            logger.warn("invoke called with target " + (target != null ) + " which is not an instance of " + HttpServiceInvoker.class.getSimpleName() + ", " +
                    HttpServlet.class.getSimpleName() + " or " + Filter.class.getName());
        }
       
View Full Code Here


            Filter filter = filters.get(currentCount);

            if (logger.isDebugEnabled())
                logger.debug("Getting filter for " + currentCount + ObjectUtils.identityToString(filter));
           
            filter.doFilter(request, response, this);
        }
        else if (servlet != null) {
            servlet.service(request, response);
        } else {
            incomplete = true;
View Full Code Here

        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
       
        InvocationAwareFilterChain substituteChain = new InvocationAwareFilterChain();
       
        moduleFilter.doFilter(wrappedRequest, response, substituteChain);
       
        if (substituteChain.getWasInvoked()) {
         
          if (logger.isDebugEnabled()) {
            logger.debug("Filter [" + moduleFilter + "] did not process request. Chaining request.");
View Full Code Here

      if (currentPosition == additionalFilters.size()) {
        originalChain.doFilter(request, response);
      } else {
        currentPosition++;
        Filter nextFilter = additionalFilters.get(currentPosition - 1);
        nextFilter.doFilter(request, response, this);
      }
    }

  }
View Full Code Here

    } else if (target instanceof HttpServlet) {
      HttpServlet servlet = (HttpServlet) target;
      servlet.service(request, response);
    } else if (target instanceof Filter) {
      Filter filter = (Filter) target;
      filter.doFilter(request, response, filterChain);
    } else {
      //FIXME add logging
    }
   
  }
View Full Code Here

        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
       
        InvocationAwareFilterChain substituteChain = new InvocationAwareFilterChain();
       
        moduleFilter.doFilter(wrappedRequest, response, substituteChain);
       
        if (substituteChain.getWasInvoked()) {
         
          if (logger.isDebugEnabled()) {
            logger.debug("Filter [" + moduleFilter + "] did not process request. Chaining request.");
View Full Code Here

    } else if (target instanceof HttpServlet) {
      HttpServlet servlet = (HttpServlet) target;
      servlet.service(request, response);
    } else if (target instanceof Filter) {
      Filter filter = (Filter) target;
      filter.doFilter(request, response, filterChain);
    } else {
      logger.warn("invoke called with target " + (target != null ) + " which is not an instance of " + HttpServiceInvoker.class.getSimpleName() + ", " +
          HttpServlet.class.getSimpleName() + " or " + Filter.class.getName());
    }
   
View Full Code Here

        //explicitly go through service method
        HttpServletRequest wrappedRequest = wrappedRequest(request, context, moduleName);
       
        InvocationAwareFilterChain substituteChain = new InvocationAwareFilterChain();
       
        moduleFilter.doFilter(wrappedRequest, response, substituteChain);
       
        if (substituteChain.getWasInvoked()) {
         
          if (logger.isDebugEnabled()) {
            logger.debug("Filter [" + moduleFilter + "] did not process request. Chaining request.");
View Full Code Here

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
        log.debug("Mock servlet called, simulating filter");
        Filter filter = new ResponseOverrideFilter();
        filter.init(null);
        filter.doFilter(request, response, new MockFilterChain());
    }

    /**
     * Simple FilterChain used to test Filters.
     */
 
View Full Code Here

      }
      sb.append("<p>QuickWebFrameweb's core bundle not installed or started,please install core bundle and start it first!</p>");
      sb.append("</body></html>");
      response.getWriter().write(sb.toString());
    } else {
      frameworkBridgeFilter.doFilter(arg0, arg1, arg2);
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.