struts2运行时出错 求大神指导
我只是创建了一个最简单的struts2项目,启动tomcat服务器时报错,如下:
严重: Dispatcher initialization failed
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
严重: Exception starting filter struts2
java.lang.reflect.
InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:483)
严重: Error filterStart
2013-3-5 10:04:10 org.apache.catalina.core.StandardContext start
严重: Context [/testStruts2.0_2] startup failed due to previous errors
2013-3-5 10:04:10 org.apache.coyote.http11.Http11Protocol start
struts
tomcat
filter
exception
java
------解决方案--------------------严重缺少jar
------解决方案--------------------看一个下你的web.xml配置
------解决方案--------------------尝试 注释下 web.xml 里边过滤器的配置 再clean下 project 重新deploy 。 run 试试!
------解决方案--------------------jar截图发来看下
------解决方案--------------------struts2的web.xml改成
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
试试
或
org.apache.struts2.dispatcher.FilterDispatcher------解决方案--------------------javassist-xxx.ga.jar
你的还少很多jar包呢