struct2 学习之——通配符配置Action
例如:
<action name="*" class="com.neusoft.action.testAction" method="{1}">
<result name="success">/welcome.jsp</result>
<result name="{1}">/{1}.jsp</result>
</action>
<result name="success">/welcome.jsp</result>
<result name="{1}">/{1}.jsp</result>
</action>
如果浏览器输入的是 test.action
则上边会变成:
<action name="test" class="com.neusoft.action.testAction" method="test">
<result name="success">/welcome.jsp</result>
<result name="test">/test.jsp</result>
</action>
<result name="success">/welcome.jsp</result>
<result name="test">/test.jsp</result>
</action>