问题描述:maven项目出现如下错误

JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer..Maven Java EE Configuration     Problem
JavaServer Faces 2.0 can not be installed : One or more constraints have not been satisfied..line 1 Maven Java EE Configuration Problem

解决方案:

首先,将webapp下的web.xml文件

  <?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

替换为

 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
</web-app>

然后,关闭Eclipse,改项目下的.settings\org.eclipse.wst.common.project.facet.core.xml,将 版本改成为3.0,将成后是<installed facet="jst.web" version="3.0"/>,再启动Eclipse.

最后,在Problems View的出错提示右键选Quick Fix,再按提示确定就OK;或者,右键项目->Maven->Update Project

=====================

此时,问题一般解决。如还不能解决,尝试在pom.xml中加入如下代码:

      <build>
<finalName>chm</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>

JavaServer Faces 2.0 can not be installed解决方案的更多相关文章

  1. 项目报错“JavaServer Faces 2.2 can not be installed : One or more constraints”等一系列问题

    在做springmvc+maven项目时,经常遇到如下错误: 解决办法(这里以jdk1.8,web3.0为例): 一:保证build path的jre版本 remove掉旧版本的,add新版本 二:保 ...

  2. JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer

    Description Resource Path Location Type JavaServer Faces 2.2 can not be installed : One or more cons ...

  3. 解决JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer问题

    ** 错误1: **在eclipse中新创建一个web项目的时候项目下的JSP文件中会爆出错误:The superclass “javax.servlet.http.HttpServlet” was ...

  4. JavaServer Faces (JSF) with Spring

    JavaServer Faces (JSF) with Spring Last modified: April 30, 2018 by baeldung Spring+ Spring MVC JSF ...

  5. 使用JavaServer Faces技术的Web模块:hello1 example

    该hello1应用程序是一个Web模块,它使用JavaServer Faces技术来显示问候语和响应.您可以使用文本编辑器查看应用程序文件,也可以使用NetBeans IDE. 此应用程序的源代码位于 ...

  6. SpringSide 部署showcase项目出现 JAX-RS (REST Web Services) 2.0 can not be installed错误!

    maven+springmvc错误 JAX-RS (REST Web Services) 2.0 can not be installed 项目problem提示错误 JAX-RS (REST Web ...

  7. Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed

    Python Django生成国际化和本地化.po文件步骤1.在settings文件中,添加一下内容: LANGUAGES = ( ('zh-hans', ugettext_lazy('Simplif ...

  8. JavaServer Faces生命周期概述

    JavaServer Faces应用程序的生命周期在客户端为页面发出HTTP请求时开始,并在服务器响应该页面并转换为HTML时结束. 生命周期可以分为两个主要阶段:执行和渲染.执行阶段进一步分为子阶段 ...

  9. npm WARN react-native-maps@0.14.0 requires a peer of react@>=15.4.0 but none was installed

    install  the  react-native     here comes a  questions :: npm WARN react-native@0.41.2 requires a pe ...

随机推荐

  1. tcp传送xml

    import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.i ...

  2. C++中的new与delete(二)

    C++一个对象构造的完整过程为:分配内存和初始化,这也是new关键字所实现的功能,分配内存可通过重载new操作符来实现,系统初始化可通过调用构造函数来完成.我们不能改变new关键字的功能,但可以改变分 ...

  3. 用 pytube 爬取 youtube 视频

    这个方法比直接用浏览器插件逼格高点 1. 简介 需要用到 pytube 这个第三方库:https://github.com/nficano/pytube 这里只是把这个页面捡重要部分翻译了一下. py ...

  4. SqlServer 行转列(统计某年一到十二个月数据总和)

    select * from(    select sum(case MONTH(purchase_date) when '1' then SumMoney else 0 end) as January ...

  5. -webkit-overflow-scrolling : touch;快速滚动标签

    http://www.cnblogs.com/PeunZhang/p/3553020.html(链接出处,只是转载学习) 对于如何使用弹性滚动,这里并没有最好的方案,具体看产品的用户群.产品的定位等, ...

  6. ul和dl的区别

    列表中有标题的时候就用dl,没有的话就用ul

  7. CentOS6.5上Oracle11gR2静默安装

    一.环境准备环境 操作系统:CentOS release 6.5 (Final) 内核版本:2.6.32-431.el6.x86_64 物理内存:2G(必须大于1G) swap分区:3G(必须大于3G ...

  8. Linux Pthread 深入解析(转-度娘818)

    Linux Pthread 深入解析   Outline - 1.线程特点 - 2.pthread创建 - 3.pthread终止         - 4.mutex互斥量使用框架         - ...

  9. javascript跨域、iframe跨域访问

    1.window 对象 浏览器会在其打开一个 HTML 文档时创建一个对应的 window 对象.但是,如果一个文档定义了一个或多个框架(即,包含一个或多个 frame 或 iframe 标签),浏览 ...

  10. How to Remove Table Partitioning in SQL Server

    In this article we will see how we can remove partitions from a table in a database in SQL server. I ...