What is the use of filter and chain in servlet?

后端 未结 3 1346
名媛妹妹
名媛妹妹 2020-11-27 18:49

chain.doFilter(req,res);
We used this in a servlet program. I want to know what is the use of the method doFilter() in a servlet? Also what is

3条回答
  •  伪装坚强ぢ
    2020-11-27 19:08

    Filters are there to complement Servlets. For the usage, you should read this, The Essentials of Filters. Filters are implemented using Chain of Responsibility GoF pattern.

提交回复
热议问题