servlet-api.jar、jsp.jar 项目环境与部署容器 冲突的问题

工程中依赖这两个jar

所以必须加入classpath

 

但是部署到tomcat下会与common/lib冲突

 

有人说解决办法是手动去删

有人说解决办法是在JAVA_HOME中加入这两个jar

但更好的办法应该是直接不让它部署

 

在maven中:

		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>

 

 

这个在myelipse中还有问题需要:

Most people should be able to hot-deploy as normal now using the MyEclipse server tools, however i have noticed some people have problems with servlet-api.jar and jsp-api.jar conflicts, if that is the case then the following steps should fix that:

 

Right click on your project and go to the properties>java build path>libraries You will need to look through this list for servlet-api.jar and jsp-api.jar, remove them and add the J2EE library (You will need to do this each time you run the eclipse target or else your servlet-api.jar and jsp-api.jar will get deployed to your web server and may interfere with the one it already has in it’s classpath

 

Next, still under the project properties item go to MyEclpse->Web->Deployment uncheck the ‘workbench default settings’ and ‘Jars in web Projects user Libraries’ you should now be able to do a normal MyEclipse hot-deploy…

 

http://www.oneadam.net/?p=39

 

感谢大牛GL的指导!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值