创建WEB动态项目后出现faces-config.xml错误

时间:2015-08-28 10:23:21

标签: java xml eclipse faces-config

我刚刚在Eclipse中创建了一个Web动态项目,并在faces-config.xml中遇到了一些错误。我无法找到解决方案。我希望有人可以提供帮助 -

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>.

1 个答案:

答案 0 :(得分:0)

faces-config.xml文件中的

faces-config标签应如下所示:

<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">

如果没有帮助,你可以分享你的faces-config.xml吗?