JavaServer Faces 2.0 can installed solution

Source: Internet
Author: User

Problem Description: The MAVEN project appears with the following error

JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer. Maven Java EE Configuration problem
JavaServer Faces 2.0 can not is installed:one or more constraints has not been satisfied. Line 1 Maven Java EE Configuration problem

Solution:

First, add the Web. xml file under WebApp

1  <?xml version= "1.0" encoding= "UTF-8"? >2   <!--<! DOCTYPE web-app3 public  "-//sun Microsystems, INC.//DTD Web Application 2.3//en" 4  "http://java.sun.com/dtd/ Web-app_2_3.dtd ">

Replaced by

1 <web-app xmlns= "Http://java.sun.com/xml/ns/javaee" 2     xmlns:xsi= "http://www.w3.org/2001/ Xmlschema-instance "3     xsi:schemalocation=" Http://java.sun.com/xml/ns/javaee 4                         Http://java.sun.com/xml/ns /javaee/web-app_3_0.xsd "5                         version=" 3.0 ">6     <display-name>archetype Created web application</ Display-name>7 </web-app>

Then, turn off eclipse, change the. Settings\org.eclipse.wst.common.project.facet.core.xml under Project, change the version to 3.0, and it will be <installed facet= " Jst.web "version=" 3.0 "/>, and then start Eclipse.

Finally, in the problems view error prompt to select the Quick Fix, then follow the prompts to determine the OK; or, right-click the Project->maven->update Project

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

At this point, the problem is generally resolved. If this does not work, try adding the following code to the Pom.xml:

1     <build> 2         <finalName>chm</finalName> 3         <plugins> 4             <plugin> 5                 <artifactId>maven-compiler-plugin</artifactId> 6                 <version>2.0.2</version> 7                 < Configuration> 8                     <source>1.6</source> 9                     <target>1.6</target>10                 </ Configuration>11             </plugin>12         </plugins>13     </build>

JavaServer Faces 2.0 can installed solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.