码迷,mamicode.com
首页 > 编程语言 > 详细

org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.servlet.Servlet

时间:2015-04-30 19:31:32      阅读:971      评论:0      收藏:0      [点我收藏+]

标签:

java.lang.ClassCastException: org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.servlet.Servlet

maven下web项目依赖servlet-api.jar

1 <dependency>
2     <groupId>javax.servlet</groupId>
3     <artifactId>servlet-api</artifactId>
4     <version>2.4</version>
5 </dependency>

忘了应该这么写以免与tomcat内置jar包冲突:

1 <dependency>
2    <groupId>javax.servlet</groupId>
3    <artifactId>servlet-api</artifactId>
4    <version>2.4</version>
5    <scope>provided</scope>
6 </dependency>

 

org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.servlet.Servlet

标签:

原文地址:http://www.cnblogs.com/xiluhua/p/4469443.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!