FilterChain (Java EE 5)

Java EE API


javax.servlet Interface FilterChain


public interface FilterChain


FilterChain 是 servlet 容器为开发人员提供的对象,它提供了对某一资源的已过滤请求调用链的视图。过滤器使用 FilterChain 调用链中的下一个过滤器,如果调用的过滤器是链中的最后一个过滤器,则调用链末尾的资源。
英文文档:

A FilterChain is an object provided by the servlet container to the developer giving a view into the invocation chain of a filtered request for a resource. Filters use the FilterChain to invoke the next filter in the chain, or if the calling filter is the last filter in the chain, to invoke the resource at the end of the chain.

Since:
Servlet 2.3
See Also:
Filter

Method Summary
 void
 

Method Detail

public void doFilter(ServletRequest request, ServletResponse response) throws java.io.IOException, ServletException
导致链中的下一个过滤器被调用,如果调用的过滤器是链中的最后一个过滤器,则导致调用链末尾的资源。
request 沿着链传递的请求。
response 沿着链传递的响应。
since2.3
英文文档:

doFilter

void doFilter(ServletRequest request,
              ServletResponse response)
              throws IOException,
                     ServletException
Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked.

Parameters:
request - the request to pass along the chain.
response - the response to pass along the chain.
Throws:
IOException
ServletException
Since:
2.3


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!