javax.servlet.FilterChain[通俗易懂]

Java (99) 2023-03-27 12:14

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说javax.servlet.FilterChain[通俗易懂],希望能够帮助你!!!。
javax.servlet.FilterChain[通俗易懂]_https://bianchenghao6.com/blog_Java_第1张javax.servlet

Interface FilterChain

public interface 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. FilterChain是一个由servlet容器提供给开发人员的对象,给出某资源的过滤请求的调用链视图。 Filter使用FilterChain调用链中的下一个过滤器,如果调用过滤器是链中的最后一个过滤器, 调用链尾部的资源。

Since:

Servlet 2.3

See Also:

Filter

Method Summary

void

doFilter(ServletRequest request, ServletResponse response)

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. 使得链中的下一个过滤器被调用,如果该调用过滤器已是链中的最后一个过滤器, 那么使得链尾部的资源被调用。

Method Detail

doFilterpublic 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

发表回复