zoukankan      html  css  js  c++  java
  • JavaServer Faces 2.0 can not be installed解决方案

    问题描述: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,改项目下的.settingsorg.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>
    复制代码
  • 相关阅读:
    单链表反转非递归
    Java中boolean类型到底占用多少个字节
    多线程,计算List<Integer>
    es聚合操作
    字符串压缩
    dart effective-风格和文档
    dart effective-用法
    node 安装
    Rabbitmq 报错信息
    rabbitmq 工作模式
  • 原文地址:https://www.cnblogs.com/zhuawang/p/5665462.html
Copyright © 2011-2022 走看看