struts2 2.1.6报错 严重: Exception starting filter struts2
struts2 2.1.6报错 严重: Exception starting filter struts2
用的是struts2 2.1.6
web.xml中的struts2过滤器为:
<constant name="struts.devMode" value="false" />
如果能启动成功说明我们问题一样。
现在你把value的值改为true,然后再去改安装版tomcat的路径,
把tomcat的路径改在C盘得根目录下,然后tomcat的路径中不能有空格,你再启动试试,应该就可以了。
其实这个是Struts2.1.6的一个BUG,Tomcat的路径不能有空格。
最后我又测试了一下免安装版的tomcat,就不用改在c盘根目录下。测试也通过。Tomcat的路径不能有空格。
注意:2.1.6版本可以直接在url中,输入例如:http://localhost:8088/Struts2_Test/user/user!add?user.name=a&user.age=8
add方法后面不用加.action,而2.0版本必须加.action,否则访问不到。