Bonjour à tous,
Je développe une appli web avec EJB3 , JSF, Hibernate, JPA sous eclipse Ganymede avec JBoss. Seulement je n'arrive pas à déployer mon appli depuis eclipse. Et pour comprendre le probleme, j'ai fait une appli web mais de deux pages dont le déploiement s'effectue normalementmais la page http://localhost:8080/TestJsf/index.html affiche l'erreur suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Buildfile: J:\eclipse-jee-ganymede-win32\eclipse\plugins\org.eclipse.jst.server.generic.jboss_1.5.205.v200805140145\buildfiles\jboss323.xml deploy.j2ee.ear: [jar] Building jar: C:\Documents and Settings\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\TestJsfEAR.ear [move] Moving 1 file to J:\ServeurJBoss\jboss-4.2.2.GA\server\default\deploy BUILD SUCCESSFUL Total time: 10 secondsVoici mes sources:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Etat HTTP 404 - /TestJsf/index.html -------------------------------------------------------------------------------- type Rapport d'état message /TestJsf/index.html description La ressource demandée (/TestJsf/index.html) n'est pas disponible. -------------------------------------------------------------------------------- JBossWeb/2.0.1.GA
login.jsp
index.html
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <f:view locale="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Application de tests avec JSF</title> </head> <body> <h:form> <h3>Identification</h3> <table> <tr> <td>Nom : </td> <td><h:inputText value="#{login.nom}"/></td> </tr> <tr> <td>Mot de passe :</td> <td><h:inputSecret value="#{login.mdp}"/></td> </tr> <tr> <td colspan="2"><h:commandButton value="Login" action="#{login.nom}"/></td> </tr></table> </h:form> </body> </f:view> </html>LoginBean.java
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Refresh" content= "0; URL=login.faces"/> <title>Demarrage de l'application</title> </head> <body> <p>Démarrage de l'application ...</p> </body> </html>
web.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package code; public class LoginBean { private String nom; private String mdp; public String getMdp() { return mdp; } public String getNom() { return nom; } public void setMdp(String string) { mdp = string; } public void setNom(String string) { nom = string; } }faces-config.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>TestJsf</display-name> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <servlet> <servlet-name>FacesServlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>*</url-pattern> </servlet-mapping> </web-app>
Aidez-moi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <?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_1_2.xsd" version="1.2"> <!--Global navigation rules--> <navigation-rule> <from-view-id>/login.jsp</from-view-id> <navigation-case> <from-outcome>login</from-outcome> <to-view-id>/accueil.jsp</to-view-id> </navigation-case> </navigation-rule> <managed-bean> <managed-bean-name>login</managed-bean-name> <managed-bean-class>code.LoginBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config>
Partager