Chain.doFilter在Filter.doFilter方法中做什么? [英] What is chain.doFilter doing in Filter.doFilter method?

查看:760
本文介绍了Chain.doFilter在Filter.doFilter方法中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

doFilterdoFilter内部做什么?这不是递归调用吗?

What is doFilter doing inside a doFilter? Isn't it a recursive call?

推荐答案

Servlet过滤器是责任链设计模式.

Servlet Filters are an implementation of the Chain of responsibility design pattern.

所有过滤器都已链接(按照其在web.xml中的定义顺序). chain.doFilter()进行到链中的下一个元素.链的最后一个元素是目标资源/servlet.

All filters are chained (in the order of their definition in web.xml). The chain.doFilter() is proceeding to the next element in the chain. The last element of the chain is the target resource/servlet.

这篇关于Chain.doFilter在Filter.doFilter方法中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆