问题描述: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. Android 中onSaveInstanceState和onRestoreInstanceState学习

    1. 基本作用: Activity的 onSaveInstanceState() 和 onRestoreInstanceState()并不是生命周期方法,它们不同于 onCreate().onPaus ...

  2. 基于mongodb的python之增删改查(CRUD)

    1,下载mongodb的python驱动,http://pypi.python.org/pypi/pymongo/,根据操作系统和python平台版本选择相应的egg或exe安装. 2,新建一个py脚 ...

  3. iOS学习之iOS沙盒(sandbox)机制和文件操作之NSFileManager(三)

    1.在Documents里创建目录 创建一个叫test的目录,先找到Documents的目录, NSArray *paths = NSSearchPathForDirectoriesInDomains ...

  4. Maven学习-目录结构

    在前一篇文章中,我们介绍了什么是Maven,以及如何用Maven来构建我们的项目.不了解Maven的童鞋,可以看这里Maven学习-入门.在这篇文章中,我们将学习Maven的项目的目录结构相关的内容. ...

  5. KANO模型

    一.满意度的定义 消费者的满意度是取决于他们对企业所提供的产品和服务的事前期待,与实际(感知)效果之间的比较后,用户形成的开心或失望的感觉.就是说,如果购后在实际消费中的实际效果与事前期待相符合,则感 ...

  6. JavaScript+HTML,简单的计算器实现

    成功进化到程序猿快一年多了, 还没写过计算器, 正好今天比较闲,随手写了个计算器,最简单的实现,核心是eval()方法,把字符串作为JS代码处理,把输入的信息拼接成字符串,点等号执行代码得到结果,出异 ...

  7. Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法

    The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...

  8. asd

    弹出输入提示框 :window.prompt(); 24. 指定当前显示链接的位置 :window.location.href="URL" 25. 取出窗体中的所有表单的数量 :d ...

  9. mybatis:Invalid bound statement (not found)

    [常规解决办法] 如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因 ...

  10. linux挂着U盘和光盘

    挂载光盘 mkdir /mnt/cdrom/ (建立挂载点) mount -t iso9660 /dev/cdrom /mnt/cdrom (挂载光盘) mount /dev/sr0 /mnt/cdr ...