java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener为什么找不到?

原文转至:http://www.cnblogs.com/JsonShare/p/5474945.html

 
org.springframework.web.context.ContextLoaderListener

  
    action
    org.apache.struts.action.ActionServlet
    
      config
      /WEB-INF/struts-config.xml
    
    2
 


  
  
    action
    *.do
  
  
   
contextConfigLocation
/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml

但当tomcat启动时就报这个错误

原因是因为:maven dependencies并没有直接性的被加载,需要重新再添加到项目中

解决办法:

 点击 Properties 选择Deployment Assembly 再点击右边的Add按钮 选择Java Build Path Entries后点击Next按钮 然后选择你的Maven Dependencies 确定即可


如果已经有了Maven Dependencies 的话,将其移除,clean一下项目,然后再重新添加

你可能感兴趣的:(学习)