简体   繁体   中英

faces-config.xml errors after creating a WEB Dynamic Project

I just created a Web Dynamic Project in Eclipse and got some errors in faces-config.xml. I couldn't find a solution for this. I hope someone can help-

Multiple annotations found at this line:
- cvc-elt.1: Cannot find the declaration of element 'faces-config'.
- schema_reference.4: Failed to read schema document 'jar:file:/C:/EPOS/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.201.v201501151629.jar!/
 dtdsAndSchemas/web-facesconfig_2_2.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not 
 <xsd:schema>.

in faces-config.xml file faces-config tag should look like this:

<faces-config version="2.2"
              xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

If it doesn't help, can you share your faces-config.xml?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM