我是靠谱客的博主 贤惠音响,最近开发中收集的这篇文章主要介绍bug宝典JAVA篇 package javax.servlet.http does not exis,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
执行maven install命令时,出现了下面的错误
result is :[ERROR] /root/.jenkins/workspace/fontal/dzmsoft-ccs/src/main/java/com/dzmsoft/ccs/base/controller/CcsDataDictionaryController.java:[7,26] package javax.servlet.http does not exis
result is :[ERROR] /root/.jenkins/workspace/fontal/dzmsoft-ccs/src/main/java/com/dzmsoft/ccs/base/controller/CcsDataDictionaryController.java:[68,37] cannot find symbo
result is :[ERROR] symbol: class HttpServletReques
result is :[ERROR] location: class com.dzmsoft.ccs.base.controller.CcsDataDictionaryControlle
result is :[ERROR] /root/.jenkins/workspace/fontal/dzmsoft-ccs/src/main/java/com/dzmsoft/ccs/base/controller/CcsDataDictTypeController.java:[7,26] package javax.servlet.http does not exis
result is :[ERROR] /root/.jenkins/workspace/fontal/dzmsoft-ccs/src/main/java/com/dzmsoft/ccs/base/controller/CcsDataDictTypeController.java:[65,40] cannot find symbo
result is :[ERROR] symbol: class HttpServletReques
result is :[ERROR] location: class com.dzmsoft.ccs.base.controller.CcsDataDictTypeControlle
result is :[ERROR] /root/.jenkins/workspace/fontal/dzmsoft-ccs/src/main/java/com/dzmsoft/ccs/base/controller/CcsDataDictionaryTreeController.java:[66,40] cannot find symbo
检查pom.xml,发现scope是test,改成provided,应该就可以。
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>test</scope>
</dependency>
不过查看我的web.xml,已经是3.0了,servlet-api2.5已经过时了
于是改用了
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
最后
以上就是贤惠音响为你收集整理的bug宝典JAVA篇 package javax.servlet.http does not exis的全部内容,希望文章能够帮你解决bug宝典JAVA篇 package javax.servlet.http does not exis所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复