welcome页面配置,高分相赠送
我想输入http://localhost:8080/sample后,直接运行sample.do
①struts.config.xml:
<global-forwards>
<forward
name="welcome"
path="/MyLoinTop.do"/>
</global-forwards>
②自己所建工程下的web.xml
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
③welcome.jsp中加了这样一句:
<html:link forward="welcome">
④server.xml中配置了contextpath
以上配置后,直接输入http://localhost:8080/sample,并不能到我想要的MyLoinTop.do
注意:
不能改变tomcat下的web.xml,而是配置我自己工程的web.xml