发布项目到tomcat中时,编译的class文件与.java文件一起发布了

3 篇文章 0 订阅

开发中遇到的问题,发布项目到tomcat中时,编译的class文件与.java文件一起发布了,如下图


解决方案:

打开原项目,找到.classpath文件,右键选择相应的程序打开。如下图所示


问题出在圈住的地方。

修改为:

<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>

然后刷新eclipse中的项目,删除原来部署的tomcat的项目,重新部署就可以了!

修改后的文件为

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
	<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.cross.easystruts.eclipse.STRUTS13_CONTAINER"/>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections-3.2.1.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-digester.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-fileupload.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-javaflow-20060411.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-validator.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dwr.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/iTextAsian.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ireport.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jakarta-oro.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jcommon-1.0.10.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jdom_1_0.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jfreechart-1.0.6-experimental.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jfreechart-1.0.6-swt.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jfreechart-1.0.6.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/junit.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/proxool-0.9.1.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/proxool-cglib.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/servlet.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/shtools2009.6.13.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/swtgraphics2d.jar"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_43"/>
	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
</classpath>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值