我正在努力学习 Struts2。当我在某些站点中看到 Struts2 的 web.xml 文件时,它被提到为:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
在某些示例中,它被提到为:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
有人可以帮帮我吗?什么是正确的,为什么有两种方法?
非常感谢。
最佳答案
FilterDispatcher (org.apache.struts2.dispatcher.FilterDispatcher) 从 Struts 2.1.3
开始,它就被弃用了。始终建议使用 StrutsPrepareAndExecuteFilter
关于java - 与 Struts2 的 web.xml 文件混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7379855/