Filter's instructions

xiaoxiao2021-03-06  46

Yesterday, a colleague said that the role of Filter is only filtering the requested information. I feel wrong, check some information, clarify it.

The filter is a program that is first running on the server before the associated servlet or JSP page.

Filters can be attached to one or more servlets or JSP pages and check into these resources

Request information. After this, the filter can be selected as follows:

Call resources in conventional ways (ie, call the servlet or JSP page).

Use the modified request information to call resources.

Call the resource, but modify the resource call in front of the client, in order to transfer to another resource, return a specific status code or generate an alternate output.

转载请注明原文地址:https://www.9cbs.com/read-79775.html

New Post(0)