SEVERE: Exception starting filter struts2

tomcat启动项目报错


org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
Line: 243 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:243:-1
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:504)
........
Caused by: java.lang.NullPointerException
    at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:243)
   com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:578)


 SEVERE: Exception starting filter struts2_第1张图片

 

 


错误原因,缺少了这样的代码

SEVERE: Exception starting filter struts2_第2张图片

完整的配置应该是



	

contextConfigLocation
classpath:applicationContext.xml
 

org.springframework.web.context.ContextLoaderListener
 
  
    index.jsp
  
    
        struts2
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
    
    
        struts2
        /*
    

 

 

你可能感兴趣的:(java之ssh框架专栏)