我刚刚在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>.
在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吗?