Principle filters

Question 1: multiple filters, how to determine the order of execution?

<Filter-mapping> order to determine the order of execution

Question 2: each request and response go through the filter it?

Not, whether through the filter, through several filters to a path determined by the filter;

<url-pattern>/servlet/*</url-pattern> <url-pattern>/*</url-pattern>

Problem 3: when the request and response, respectively, the filter is not performed again from start to finish is not a code;

Performs a pre-operation request, the response processing operations performed;

When requested if execution order filters are 1,2,4,

In response to the execution order of the filter 4,2,1

Question 4: In the filter can jump to any other resource projects can

Example: If a filter is permission to verify, not logged in, do not allow access to the target resource, jump directly to login.jsp

Question 5: Redirects and Forwards whether through a filter to redirect after default without forward, because it is a server-side jump. Can be resolved by configuring

Guess you like

Origin www.cnblogs.com/ww103/p/12033173.html