Bonjour,
Je developpe une petite appli de deux pages. La première va demander le nom de l'utilisateur et la seconde afficher un message de bienvenue.
index.htmllogin.jsp
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>
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
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"/></td> </tr></table> </h:form> </body> </f:view> </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 <?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>entity.LoginBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config>
Et voici la page d'erreur
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 <?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> FoyerPGV</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> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
Vous pouvez m'aider ? Je suis débutant en J2E
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 Etat HTTP 500 - -------------------------------------------------------------------------------- type Rapport d'exception message description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête. exception javax.servlet.ServletException: java.lang.VerifyError: (class: org/apache/jsp/login_jsp, method: _jspx_meth_h_005fcommandButton_005f0 signature: (Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z) Incompatible argument to function org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408) com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442) com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) cause mère java.lang.VerifyError: (class: org/apache/jsp/login_jsp, method: _jspx_meth_h_005fcommandButton_005f0 signature: (Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z) Incompatible argument to function java.lang.Class.getDeclaredConstructors0(Native Method) java.lang.Class.privateGetDeclaredConstructors(Unknown Source) java.lang.Class.getConstructor0(Unknown Source) java.lang.Class.newInstance0(Unknown Source) java.lang.Class.newInstance(Unknown Source) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408) com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442) com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de JBossWeb/2.0.1.GA. --------------------------------------------------------------------------------
Partager