1,首先在struts.xml里添加如下代码:注意位置

<constant name="struts.action.extension" value="do,action" />

注意 后来做测试发现这句话如果加了 就不能在uri调通action,所以还是去掉了。

2,在web.xml的欢迎首页配置action

1     <welcome-file-list>
2         <welcome-file>index.action</welcome-file>
3     </welcome-file-list>

其中,index为方法名  action为后缀。

3,在WebRoot根目录下创建index.action文件。

 

posted on 2016-11-14 16:55  wEndu  阅读(310)  评论(0编辑  收藏  举报