[英]How can I map the root path of my web application using struts2?
When I run my strust2 web application, I want to execute an action for the root path [/]
. 当我运行strust2 Web应用程序时,我想对根路径[/]
执行操作。 It would be something like an action with no name or just "/"
, something like: 这就像没有名称或仅带有"/"
的动作一样,例如:
<action name="/" class="ControllerName" method="execute">
<result name="success">ShowTheFirstPageAfterTheAction.jsp</result>
</action>
...
<struts>
...
<package name="user" namespace="/" extends="struts-default">
<action name="" class="ControllerName" method="execute">
<result name="success">ShowTheFirstPageAfterTheAction.jsp</result>
</action>
// Other actions depending on how you've designed your application
<package
// Other packages (also) depending on how you've designed your application
</struts>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.