簡體   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