0
我該如何解決這個錯誤?安裝失敗JavaServer Faces 2.0
Failed while installing JavaServer Faces 2.0.
'web' : unable to configure web module for JavaServer Faces
這裏是我的web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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>web</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>**/faces/*</url-pattern>
</servlet-mapping>
</web-app>
這裏是我的faces-config.xml中:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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-facesconfig_2_0.xsd"
version="2.0">
</faces-config>
這裏是我的pom.xml:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
</project>
當我添加的facelet-標籤庫,錯誤是這樣的:CVC-複雜type.2.4.b:元素的含量'facelet-taglib'不完整。其中一個'{「http:// xmlns.jcp.org/xml/ns/javaee":description,」http://xmlns.jcp.org/xml/ns/javaee":display-name,「http: // xmlns.jcp.org/xml/ns/javaee":icon,「http://xmlns.jcp.org/xml/ns/javaee":library-class」,http:// xmlns.jcp。 org/xml/ns/javaee「:namespace}」。 –
你可以發佈你的完整pom嗎? –