サーバーに公開しようとすると、次のエラーが発生します。Apache myfaces 2.0 をダウンロードしました。また、これらをライブラリとして Eclipse に追加し、JSF 2.0 のプロジェクト ファセットを追加しました。
原因: org.apache.xmlbeans.XmlException: 無効なデプロイメント記述子: エラー: jar:file:/C:/DOCUME~1/shawt/LOCALS~1/Temp/geronimo-deployer7810915779003395233.tmpdir/Scout.war!/WEB- INF/faces-config.xml:2:1: エラー: cvc-enumeration-valid: 文字列値 '2.0' は、名前空間 http://java.sun.com/xmlの faces-config-versionType の有効な列挙値ではありません/ns/ジャビー
これが私のものfaces-config
です:
<?xml version="1.0"?>
<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/web-facesconfig_2_0.xsd"
version="2.0">
<navigation-rule>
<from-view-id>menu.jsp</from-view-id>
<navigation-case>
<from-action>#{pageController.processPage1}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>test.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
これが私のもの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_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Scout</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>*.jsp</url-pattern>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>