- 检查struts.xml名字是否正确
- 检查web.xml和struts.xml配置是否正确
- (mvn项目)如果以上都正确的话就是struts.xml无法编译了,也就是说target里面没有struts.xml。应该将struts.xml放在resource下,并在pom.xml下的build节点下添加如下代码:
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>