1,首先在struts.xml里添加如下代码:注意位置
<constant name="struts.action.extension" value="do,action" />
注意 后来做测试发现这句话如果加了 就不能在uri调通action,所以还是去掉了。
2,在web.xml的欢迎首页配置action
<welcome-file-list>
<welcome-file>index.action</welcome-file>
</welcome-file-list>
其中,index为方法名 action为后缀。
3,在WebRoot根目录下创建index.action文件。