在我的 struts.xml (包名称是website
)中,我有一个包含到子 xml 的内容:
<include file="child.xml"/>
action
我的struts.xml 中也有一个欢迎词:
<action name="welcome">
<result>welcome.jsp</result>
</action>
我的 child.xml 扩展了 struts.xml:
<package name="child" namespace="/child" extends="website">
接下来我想做的是在我的 child.xml 中创建一个重定向到该操作的welcome
操作。到目前为止,我的 child.xml 中有以下内容,但它不起作用:
<action name="">
<result type="redirectAction">welcome</result>
</action>
我认为它不起作用的原因是因为它/child/welcome
默认会转到 URL 而不是/welcome
. 因此,如果可能的话,我需要一种方法来action
在 child.xml 的定义中转义它。