繁体   English   中英

如何使用struts2映射Web应用程序的根路径?

[英]How can I map the root path of my web application using struts2?

当我运行strust2 Web应用程序时,我想对根路径[/]执行操作。 这就像没有名称或仅带有"/"的动作一样,例如:

<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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM