目录[-]
问题描述
用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一般现在都是用3.0,在Project Facets里面修改Dynamic web module为3.0的时候就会出现Cannot change version of project facet Dynamic web module to 3.0,如图:
其实在右边可以看到改到3.0需要的条件以及有冲突的facets,4
解决这个问题的步骤如下:
1.把Servlet改成3.0,打开项目的web.xml
1
2
3
4
5
|
<? 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"
xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id = "schedule-console" version = "3.0" >
|
2.修改项目的设置,在Navigator下打开项目.settings目录下的org.eclipse.jdt.core.prefs
把1.5改成1.7
1
2
3
4
5
6
7
8
|
eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.compliance=1.7 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.7 |
3. 打开org.eclipse.wst.common.component
本文件不用修改
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<? xml version = "1.0" encoding = "UTF-8" ?>< project-modules id = "moduleCoreId" project-version = "1.5.0" >
< wb-module deploy-name = "xband-schedule-console" >
< 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" />
< dependent-module archiveName = "xband-schedule-core-1.0-SNAPSHOT.jar" deploy-path = "/WEB-INF/lib" handle = "module:/resource/xband-schedule-core/xband-schedule-core" >
< dependency-type >uses</ dependency-type >
</ dependent-module >
< property name = "java-output-path" value = "/xband-schedule-console/target/classes" />
< property name = "context-root" value = "schedule-console" />
</ wb-module >
</ project-modules >
|
4. 打开org.eclipse.wst.common.project.facet.core.xml
把1.5改成1.7
1
2
3
4
5
6
7
|
<? 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.7" />
</ faceted-project >
|
最后的效果如图:
相关推荐
Java compiler level does not match the version of the installed Java project facet. Unknown Faceted Project Problem (Java Version Mismatch) 1、preferences > java > Installed JRES > 选择java version ...
可实现表达式的加减运算,以及中缀和后缀表达式
lucene facet查询示例,区间查询多dim查询,key-field-value模型了解
facet边缘检测的matlab源代码,是基于二阶模型,只要运行最后一个hhh.m就可以了
idea部署eclipse的web项目(tomcat) 跟着走,无脑操作
solrj的facet查询总结
MFC开发的基于WinPcap的网络数据包的捕获与分析。
一、获取元素(Getting Elements) 1.Ext.get var el = Ext.get('myElementId');//获取元素,等同于document.getElementById('myElementId');//会缓存 2. Ext.fly var el = Ext.fly('myElementId')//不需要缓存...
solr facet 笔记
图书管理系统
Effects of facet reflectivity of a laser diode on thc performance of fiber Bragg grating semiconductor lasers are studied experimentally. Facet reflectivity of less than 10"4 is necessary to obtain ...
通过matlab完整再现facet小面模板卷积方法下的灰度图像边缘检测,注解完整,有效帮助理解整个理论实现。
NULL 博文链接:https://iamyida.iteye.com/blog/2203743
利用匹配策略扩展卷积神经网络的分面标注方法,吴蓓, 魏笔凡,大多数的社区问答网站通过主题组织大量的问答对,但是这种基于主题的组织模式不能满足用户的搜索需求。而主题分面更有利于组织和��
Lucene4.6版本,适用于Lucene的所有研究,以及中文分词功能
{100}晶面暴露TiO2纳米棒及光催化性能研究,王长华,张昕彤,本文以钛酸为前驱体,采用NaCl辅助水热法制备了{100}晶面暴露的TiO2纳米棒。 通过XRD,SEM,TEM等表征手段对样品的结构特性及生长机制进行了�
高效的面边缘检测和定量的绩效考核 首先介绍递归过程为有效地计算三次面参数的边缘检测,这个过程可以通过计算在曲面参数方程,用固定数量的相互独立算子。 然后,我们引入一个独立的图像定量标准解析评测不同的边缘...
我的博客专栏http://blog.csdn.net/wuyinggui10000/article/category/3173543,希望大家关注
You’ll learn how to choose the right programming style for each project, manage unanticipated problems, and work more successfully with every facet of JavaScript programming from data structures to ...