[英]struts2 - How to get username on every page in my web application
[英]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.