java版本,servlet版本不对时

来源:互联网 发布:铅笔袋淘宝 编辑:程序博客网 时间:2024/06/06 00:06

cannot change version of project facet Dynamic web module to 2.5或3.1 jdk 1.6 1.7 如果


3.1改成2.5

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">


修改成你要的版本
在工程目录下有一个.settings文件夹,打开org.eclipse.wst.common.project.facet.core.xml做如下修改:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="java"/>
  <fixed facet="wst.jsdt.web"/>
  <fixed facet="jst.web"/>
  <installed facet="java" version="1.6"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>



0 0
原创粉丝点击