问题描述: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. isKindOfClass,isMemberOfClass

    - (BOOL)isKindOfClass:(Class)aClass; - (BOOL)isMemberOfClass:(Class)aClass; 特点: 1.isKindOfClass   判断 ...

  2. Android RadioButton 语言无法切换问题

    1.Dialog在不退出界面的情况下,RadioButton在语言切换时,无法匹配系统语言的问题: 解决办法为:在RadioButton添加属性 android:saveEnabled="f ...

  3. The 11 advantages of Java -Why you choose this language

    Java is never just a language.There are lots of programming languages out there, and few of them mak ...

  4. vector使用篇之erase

    由于最近项目使用中发现了之前对vector的一个误区,由此发现自己对vect非常不了解,对此进行了一些了解,由此打算写一下关于vector使用方面的注意点,本篇先来讲一下vector的erase功能, ...

  5. 周末发现一个BUG,时有时无,一出程序就崩溃,郁闷了好久,终于跟出来来了,记之,提醒自己今后一定规范编写,只要规范,绝对不会出问题

    -- :::] cell0 create -- :::] *** Assertion failure /UITableView.m: -- :::] [ Uncaught Exception ] Na ...

  6. Oracle笔记1-数据库概念

    数据库: 基本的概念:数据库管理系统(Database Management System,DBMS):管理数据的一个软件系统关系型数据库管理系统(RDBMS)数据库(Database):存放数据的磁 ...

  7. 关于word excel 等的信息隐藏技术

    简单的word 信息隐藏技术分为两种 一  利用word自带的功能对信息进行隐藏,即选中要隐藏的文字 单击右键 选择字体  给隐藏选项打勾即可    这种信息隐藏比较简单  找到的方式为单机文件——找 ...

  8. CSS中的display属性

    CSS中的display属性 display:block是可以把非块级元素强制转换为块级元素显示,如内嵌元素span,原来不支持设置宽高,宽度是由内容撑开的,几个span元素是在同一行内的,如果给sp ...

  9. acm数学(转)

    这个东西先放在这吧.做过的以后会用#号标示出来 1.burnside定理,polya计数法    这个大家可以看brudildi的<组合数学>,那本书的这一章写的很详细也很容易理解.最好能 ...

  10. ios 多种传值方式

    在网上看了看传值方法,没有找到完整的.在这把自己看到的几种传值方法写写吧. 1 . 属性传值 2 . 通知传值 3 . 代理传值 4 . block传值 5 . 单列传值 6 . ShareAppli ...