eclipse的web工程无法发布到tomcat7.0中的解决办法

       今天将我用的tomcat8换成tomcat7,然后发现工程无法部署到tomcat,提示没有可部署的资源,后经查实发现,我用的是eclipse版本较新,默认配置下Dynamic web module version为3.1,而tomcat7不支持。因此,在工程的.settings中的org.eclipse.wst.common.project.facet.core.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="jst.web"/>
  <fixed facet="wst.jsdt.web"/>
  <fixed facet="java"/>
  <installed facet="java" version="1.8"/>
  <installed facet="jst.web" version="3.1"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

   将<installed facet="jst.web" version="3.1"/>
改为2.5,变成低版本即可。

猜你喜欢

转载自gjs-ht.iteye.com/blog/2265288