About Filter, you need to know

xiaoxiao2021-03-06  78

Filter is a weapon in a web application, with several attention:

1. Filter is created and destroyed by the servlet container, there is only one instance in the container, so when implementing, you need to pay attention to the thread security, and the servlet, you cannot declare the private variables related to a request processing.

2.Chain.dofilter (REQ, RESP); will call the next Filter's DOFILTER () on FilterChain, and if the last Filter on Chian is currently already, the requested resource will be processed, so this process is a step Going to the requested resources,

Return to another step, you can further process the response after chain.dofilter (REQ, RESP).

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

New Post(0)