SSH问题汇集

来源:互联网 发布:淘宝客服一直不回消息 编辑:程序博客网 时间:2024/05/21 19:44

java.lang.ClassNotFoundException: org.springframework.web.struts.ContextLoaderPlugIn

SSH开发的初期会有很多人碰到这个错误
原因是在struts-config.xml中配置了org.springframework.web.struts.ContextLoaderPlugIn
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
</plug-in>

然而又加载不到这个类,当然会报ClassNotFoundException

这个类是和Struts的整合类,并没有在spring-core.jar等文件中,而是在spring-webmvc-struts.jar中。
把spring-webmvc-struts.jar加载到ClassPath中就OK了。
原创粉丝点击