Jakarta ee 一个Web应用程序中的两个Struts2筛选器

Jakarta ee 一个Web应用程序中的两个Struts2筛选器,jakarta-ee,struts2,Jakarta Ee,Struts2,我想在一个应用程序中使用两个struts2过滤器。我在web.xml中有以下过滤器定义。“struts2”过滤器已经存在,我刚刚添加了“companion”过滤器 是否可以在一个应用程序中使用两个过滤器?如果是这样,我缺少什么?问题可以通过定义struts default.xml和struts plugin.xml和companion.xml来解决 <init-param> <param-name>config</param-name> <

我想在一个应用程序中使用两个struts2过滤器。我在
web.xml
中有以下过滤器定义。“struts2”过滤器已经存在,我刚刚添加了“companion”过滤器


是否可以在一个应用程序中使用两个过滤器?如果是这样,我缺少什么?

问题可以通过定义
struts default.xml
struts plugin.xml
companion.xml
来解决

<init-param>
    <param-name>config</param-name>
    <param-value>struts-default.xml,struts-plugin.xml,companion.xml</param-value>
</init-param>

配置
struts default.xml、struts plugin.xml、companion.xml

参考资料:

通过使用
companion.xml
定义
struts default.xml
struts plugin.xml
来解决问题

<init-param>
    <param-name>config</param-name>
    <param-value>struts-default.xml,struts-plugin.xml,companion.xml</param-value>
</init-param>

配置
struts default.xml、struts plugin.xml、companion.xml

参考资料:

此外,我正在使用WebSphere 6.1。此外,我正在使用WebSphere 6.1。
<init-param>
    <param-name>config</param-name>
    <param-value>struts-default.xml,struts-plugin.xml,companion.xml</param-value>
</init-param>