Package javax.servlet

Examples of javax.servlet.FilterChain.doFilter()


        expect(container.getAttributeContext(isA(ServletRequest.class))).andReturn(attributeContext);
        request.setAttribute("org.apache.tiles.decoration.PREVENT:tokenKey", true);
        expect(request.getAttribute("javax.servlet.include.servlet_path")).andReturn(null);
        expect(request.getServletPath()).andReturn("/tiles");
        container.render(eq("definitionKey"), isA(ServletRequest.class));
        chain.doFilter(request, response);

        replay(servletContext, request, response, chain, applicationContext,
                applicationScope, container, attributeContext);
        filter.doFilter(request, response, chain);
        verify(request, response, chain, applicationContext, applicationScope, container, attributeContext);
View Full Code Here


    HttpServletResponse response = HttpHolder.getResponse();
    FilterChain filterChain = HttpHolder.getFilterChain();

    BufferResponseWrapper wrapper = new BufferResponseWrapper(response);
    try {
      filterChain.doFilter(request, wrapper);
    } catch (Exception e) {
      throw new LoadResoruceException(e);
    }

    // 必须执行flush操作,否则可能取不到数据.
View Full Code Here

  @Override
  public void couldntFind(RequestInfo request) {
    FilterChain chain = request.getChain();
    try {
      chain.doFilter(request.getRequest(), request.getResponse());
    } catch (IOException | ServletException e) {
      throw new InterceptionException(e);
    }
  }
View Full Code Here

        // 不会调用getContextPath和getRequestURI
        expect(request.getServletPath()).andReturn(requestURI).anyTimes();
        expect(request.getPathInfo()).andReturn(null).anyTimes();

        if (excluded && !internal) {
            filterChain.doFilter(request, response);
        }

        replay(request, response, filterChain);

        if (internal) {
View Full Code Here

public class DefaultResourceNotFoundHandler implements ResourceNotFoundHandler {

  public void couldntFind(RequestInfo request) {
    FilterChain chain = request.getChain();
    try {
      chain.doFilter(request.getRequest(), request.getResponse());
    } catch (IOException e) {
      throw new InterceptionException(e);
    } catch (ServletException e) {
      throw new InterceptionException(e);
    }
View Full Code Here

                if (res instanceof ServletResponseHttpWrapper)
                    res = ((ServletResponseHttpWrapper)res).getResponse();

                // Do the filter/handling thang
                if (chain!=null)
                    chain.doFilter(req, res);
                else
                    servlet_holder.handle(baseRequest,req,res);
            }
        }
        catch(EofException e)
View Full Code Here

public class DefaultControllerNotFoundHandler implements ControllerNotFoundHandler {

  public void couldntFind(RequestInfo request) {
    FilterChain chain = request.getChain();
    try {
      chain.doFilter(request.getRequest(), request.getResponse());
    } catch (IOException e) {
      throw new InterceptionException(e);
    } catch (ServletException e) {
      throw new InterceptionException(e);
    }
View Full Code Here

  @Override
  public void couldntFind(RequestInfo request) {
    FilterChain chain = request.getChain();
    try {
      chain.doFilter(request.getRequest(), request.getResponse());
    } catch (IOException e) {
      throw new InterceptionException(e);
    } catch (ServletException e) {
      throw new InterceptionException(e);
    }
View Full Code Here

        if (log.isDebugEnabled()) log.debug("chain="+chain);
       
        // Do the handling thang
        if (chain!=null)
            chain.doFilter(request, response);
        else if (servletHolder != null)
            servletHolder.handle(request, response);   
        else // Not found
            notFound(request, response);
    }
View Full Code Here

  {
    FilterChain next = _nextFilterChainMapper.map(_uri,
              _queryString,
              _accept);

    next.doFilter(request, response);
  }
}
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.