The filter is bound to the Web application in the form of a component. Unlike other web reference program components, the filter is processed in a "chain" manner.
Filter is a new function added after servlet2.3 in sun company
Define a filter and let a class implement the javax.servlet.Filter interface directly
Called during initialization (initialization when the container is started), the initialization parameters of the configuration can be obtained through filterConfig
public void doFilter(req,resp ,FilterChain chain)
Complete the specific filtering operation, and then let the request continue to pass down through the FilterChain