zoukankan      html  css  js  c++  java
  • Cannot change version of project facet Dynamic web module to 3.0

    遇到这个问题,在网上找了各种方法,经过实际操作,下述方式能够解决此问题。

    1.修改 web.xml

    修改为:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="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_3_0.xsd" version="3.0">
    </web-app>
    2.Window>Show View>Navigator,在Navigator下打开项目的.settings目录下org.eclipse.jdt.core.prefs,修改为:

    eclipse.preferences.version=1
    org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
    org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
    org.eclipse.jdt.core.compiler.compliance=1.8
    org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
    org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
    org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
    org.eclipse.jdt.core.compiler.source=1.8

    3.打开org.eclipse.wst.common.component,修改为:

    <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.8.0">
    <wb-module deploy-name="storm">
    <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
    <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
    <property name="context-root" value="storm"/>
    <property name="java-output-path" value="/storm/target/classes"/>
    </wb-module>
    </project-modules>

    4.打开org.eclipse.wst.common.project.facet.core.xml,修改为:

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

    保存后,打开project facets,则问题消失。

  • 相关阅读:
    LG5283 异或粽子
    LG2216 理想的正方形
    LG1484 种树
    洛谷3721 HNOI2017单旋(LCT+set+思维)
    洛谷3348 大森林 (LCT + 虚点 + 树上差分)
    CF1082E Increasing Frequency (multiset+乱搞+贪心)
    CF1082G Petya and Graph(最小割,最大权闭合子图)
    cf1082D Maximum Diameter Graph(构造+模拟+细节)
    洛谷3320 SDOI2015寻宝游戏(set+dfs序)(反向迭代器的注意事项!)
    CF613D Kingdom and its Cities(虚树+贪心)
  • 原文地址:https://www.cnblogs.com/xiufengchen/p/10349868.html
Copyright © 2011-2022 走看看