previously initiated loading for a different type with name "javax/servlet/ServletContext"
来源:互联网 发布:常见的网络攻击类型有 编辑:程序博客网 时间:2024/06/15 05:18
maven下run项目,报如上错,请先检查生成的war包中是否包含有servlet-api.jar,若有则说明是servlet-api.jar冲突。
用eclipse查看项目的pom.xml文件的jar依赖树,打开pom.xml---->选项卡Dependency Hierarchy
找到依赖的servlet-api.jar右键--->Open POM查看此jar的pom信息
根据此jar的pom信息,在项目的pom.xml文件中增加对此servlet-api的引用即可。
用eclipse查看项目的pom.xml文件的jar依赖树,打开pom.xml---->选项卡Dependency Hierarchy
找到依赖的servlet-api.jar右键--->Open POM查看此jar的pom信息
根据此jar的pom信息,在项目的pom.xml文件中增加对此servlet-api的引用即可。
<dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api-2.5</artifactId> <version>6.1.9</version> <scope>provided</scope> </dependency>注意scope必须要加上,打包后war中就不包含冲突的servlet-api.jar了
0 0
- previously initiated loading for a different type with name "javax/servlet/ServletContext"
- 【bug】previously initiated loading for a different type with name "javax/servlet/ServletContext"(142)
- LinkageError之loader (instance of xxx) previously initiated loading for a different type with name
- 【java】LinkageError之loader (instance of xxx) previously initiated loading for a different type
- 11-The type javax.servlet.ServletContext cannot be resolved.
- The type javax.servlet.ServletContext cannot be resolved.
- STS中The type javax.servlet.ServletContext cannot
- The type javax.servlet.ServletContext cannot be resolved解决方法
- javax.servlet.ServletContext接口
- javax.servlet.ServletContext翻译
- Cannot find the class file for javax.servlet.ServletContext.
- Cannot find the class file for javax.servlet.ServletContext.
- Cannot find the class file for javax.servlet.ServletContext.
- Cannot find the class file for javax.servlet.ServletContext.
- Loading a true type font with GDI+
- javax.servlet.Servlet,ServletContext接口
- (javax/servlet/ServletContext&SpringServletContainerInitializer->javax.servlet.ServletContainerIniti
- javax.servlet.ServletException: Could not resolve view with name 'ok' in servlet with name 'spring'
- hdu 1425 Sort
- C++ 重载和const形参
- 第四周项目四(2)
- cocoapods
- java常用设计模式
- previously initiated loading for a different type with name "javax/servlet/ServletContext"
- 利用c语言宏#的用法打日志并统计错误
- JavaScript学习笔记(一)
- 解一元二次方程(基于对话框)
- Oracle查询多个字段行转列处理实践案例
- 47. Permutations II | Java最短代码实现
- unityassetbundle 打包存放百度云加载
- Tkinter -- Toolbar
- stl之map介绍