Struts2 Struts 1操作重定向到Struts 2操作

Struts2 Struts 1操作重定向到Struts 2操作,struts2,struts-1,Struts2,Struts 1,我有一个带有struts 1和struts 2的java Web应用程序。在应用程序内部有几个Struts 2名称空间和Struts 1模块。例如: /public (Struts 1 module) /accounting (Struts 2 namespace) /auditing (Struts 2 namespace) /receipts (Struts 1 modules) 在my web.xml中,Struts 1和2过滤器专门映射到正确的名称空间/模块。比如说, <filt

我有一个带有struts 1和struts 2的java Web应用程序。在应用程序内部有几个Struts 2名称空间和Struts 1模块。例如:

/public (Struts 1 module)
/accounting (Struts 2 namespace)
/auditing (Struts 2 namespace)
/receipts (Struts 1 modules)
在my web.xml中,Struts 1和2过滤器专门映射到正确的名称空间/模块。比如说,

<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/accounting/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>struts1</filter-name>
    <url-pattern>/public/*</url-pattern>
</filter-mapping>
我知道这可以通过Struts 2过滤器映射网站的Struts 1部分来解决,但这会给我们的特定网站带来问题,我希望避免这样做

我还尝试了不带模块的操作:

<action path="/myRedirect" forward="/accounting/checkAccountRecords.action" />
我还尝试了以下操作映射:

<action path="/myRedirect" forward="../accounting/checkAccountRecords.action" />

还有什么我可以试试的吗?如何让Struts 1操作返回到Struts 2操作的重定向?

作为一种解决方法,在我的
Struts
操作中,我手动修改了
响应。sendRedirect
将用户发送到正确的页面,而不是将其映射到
Struts.xml
文件中。

作为一种解决方法,在我的
Struts
操作中,我手动修改了
response.sendRedirect
以将用户发送到正确的页面,而不是将其映射到
Struts.xml
文件中

<action path="/myRedirect" forward="/accounting/checkAccountRecords.action" />
can't find /receipts/accounting/checkAccountRecords.action (file not found)
<action path="/myRedirect" forward="../accounting/checkAccountRecords.action" />
Path ../accounting/checkAccountRecords.action does not start with a "/" character