Ciao a tutti; ho iniziato a guardare un po' JSF, allora ho fatto un primo esempio e tutto andava ok; ne ho fatto un altro un po' + complicato e ho iniziato ad avere dei problemi; infatti, cambiando solo il faces-config.xml, quando clicco sull'url http://localhost:8080/faces/quizIndex.jsp, tomcat mi dice che la risorsa quizIndex.jsp non è disponibile; qualcuno sa dirmi perchè?
Di seguito ri porto il web.xml e il faces-config.xml. Ciao a tutti.
ERRORE TOMCAT:
WEB.XMLThe requested resource (/quizIndex.jsp) is not available
Codice PHP:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>CoreJsf</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>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>1500</session-timeout>
</session-config>
<taglib>
<taglib-uri>jsfCore</taglib-uri>
<taglib-location>/WEB-INF/tld/jsf_core.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>htmlBasic</taglib-uri>
<taglib-location>/WEB-INF/tld/html_basic.tld</taglib-location>
</taglib>
</web-app>
FACES-CONFIG.XML
Per sviluppare utilizzo JBuilderX e mi appoggio sul suo TomcatLE 4.1.27; ciò che non riesco a capire è che un esempio precedente funzicava, ora non funzica.... Grazie a tutti e ciao.Codice PHP:<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" "D:/project/CoreJsf/CoreJsf/WEB-INF/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<application>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>it</supported-locale>
</locale-config>
</application>
<navigation-rule>
<from-view-id>/quizIndex.jsp</from-view-id>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/quizIndex.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/quizSuccess.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/quizFailure.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>done</from-outcome>
<to-view-id>/quizDone.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>startOver</from-outcome>
<to-view-id>/quizIndex.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>quiz</managed-bean-name>
<managed-bean-class>com.angelo.bean.capitolo3.QuizBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope> </managed-bean>
</faces-config>![]()
![]()

Rispondi quotando