springmvc简单项目报错java.lang.ClassNotFoundException
来源:互联网 发布:匡恩网络 裁员 编辑:程序博客网 时间:2024/05/19 00:17
发帖求助链接http://bbs.csdn.net/topics/392190768
注意事项:
1.<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 一行中不能加后缀.class,应写DispatcherServlet的全限定名。否则tomcat报错500,如链接开头所示。
错误代码:
<servlet><servlet-name>springmvc</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet.class</servlet-class><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:springmvc.xml</param-value></init-param></servlet>正确代码:
<servlet><servlet-name>springmvc</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:springmvc.xml</param-value></init-param></servlet>
2.虽然已经导入spring-webmvc包,在url正确的情况下仍报错404,根据http://blog.csdn.net/qq931399960/article/details/45119953的解决方案,还应导入commons-logging.jar包
另附上述链接中的知识点:
sprigMVC依赖包:
commons-logging.jar
spring-aop.jar
spring-beans.jar
spring-context.jar
spring-core.jar
spring-expression.jar
spring-web.xml
spring-webmvc.jar
阅读全文
1 0
- springmvc简单项目报错java.lang.ClassNotFoundException
- 使用springMVC报错: java.lang.ClassNotFoundException:
- 发布SpringMVC项目报错java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
- eclipse maven+mybatis+spring+springmvc 项目启动报错:java.lang.ClassNotFoundException: org.aspectj.weaver.r
- SpringMVC报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
- 启动项目报错 java.lang.ClassNotFoundException: javax.servlet.ServletRegistration
- 启动maven项目报错:java.lang.ClassNotFoundException: ContextLoaderListener解决方法
- maven web 项目中启动报错java.lang.ClassNotFoundException
- maven项目启动报错java.lang.ClassNotFoundException:
- eclipse运行maven项目报错java.lang.ClassNotFoundException: xxxxxx
- eclipse运行maven项目报错java.lang.ClassNotFoundException: xxxxxx
- maven项目在eclipse启动报错:java.lang.ClassNotFoundException
- maven项目在eclipse启动报错:java.lang.ClassNotFoundException
- tomcat启动项目报错:Java.lang.classnotfoundexception filterconfig
- web项目启动报java.lang.ClassNotFoundException
- Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderListener
- Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderListener
- Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderListener
- cmd CD命令用法详解
- 冒泡排序和交换排序的区别
- Centos7的ssh免密码登录
- webpack3最新版本配置研究(二)loader
- Eclipse使用ButterKnife
- springmvc简单项目报错java.lang.ClassNotFoundException
- Android超链接跳转
- BasicFramework基础框架
- CSS相关面试题汇总笔记
- HTML总结
- js中的map()方法
- 字符串替换
- sql之left join、right join、inner join的区别
- Mysql中子查询的常用语句