<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
2。index.jsp重定向
<logic:redirect forward="welcome"/>
3。struts-config.xml
1)先從全局轉向定義小節找到名爲welcome的forward
<global-forwards>
<!-- Default forward to "Welcome" action -->
<!-- Demonstrates using index.jsp to forward -->
<forward
name="welcome"
path="/Welcome.do"/>
</global-forwards>
2)再到動作定義小節找到名爲Welcome的action
<action
path="/Welcome"
forward="/pages/Welcome.jsp"/>
4。瀏覽器顯示Welcome.jsp的內容,從/WEB-INF/classes/MessageResources.properties中讀取所需信息並顯示。struts-config.xml的Message Resources Definitions部分定義了這個文件名(不含擴展名)