bonjour
je veux afficher une table de 3 champs(utilisateur_id,login,password)dans une page jsp a l'aide des struts et hibernate mais j'obtient cette erreur.
<<<<<<erreur>>>>>>>>>>>>>>>>>
<<<<<<index.jsp>>>>>>>>>>>>>>>>
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
53
54
55
56
57 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 org.apache.jasper.JasperException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) cause mère javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.index_jsp._jspService(index_jsp.java:85) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) cause mère javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443) org.apache.jsp.index_jsp._jspx_meth_html_005fform_005f0(index_jsp.java:101) org.apache.jsp.index_jsp._jspService(index_jsp.java:74) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.5.23. -------------------------------------------------------------------------------- Apache Tomcat/5.5.23
<<<<<UtilisateurAction.java>>>>>>>>>>
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 <%@ page language="java"%><%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%><%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html> <head> <title>JSP for LoginForm form</title> </head> <body> <logic:iterate name="UtilisateurForm" id="utilisateurForm"> <bean:write name="utilisateurForm" property="utilisateur_id" /> <bean:write name="utilisateurForm" property="login" /> <bean:write name="utilisateurForm" property="password" /> </form> </logic:iterate> </body> </html>
<<<<Utilisateur.java>>>>>>>>>>>>
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 /* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */ package com.logisoft.struts.action; import hibernate.Utilisateur; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.logisoft.struts.form.UtilisateurForm; /** * MyEclipse Struts * Creation date: 05-17-2007 * * XDoclet definition: * @struts.action path="/utilisateur" name="utilisateurForm" input="/index.jsp" scope="request" validate="true" * @struts.action-forward name="success" path="/index.jsp" */ public class UtilisateurAction extends Action { /* * Generated Methods */ /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { UtilisateurForm utilisateurForm = (UtilisateurForm) form; Utilisateur utilisateur=new Utilisateur(); utilisateurForm.setLogin(utilisateur.getLogin()); utilisateurForm.setPassword(utilisateur.getPassword()); utilisateurForm.setUtilisateur_id(utilisateur.getUtilisateurId()); return mapping.findForward("success"); } }
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89 package hibernate; import com.sun.corba.se.spi.activation.EndPointInfo; import com.sun.corba.se.spi.activation.NoSuchEndPoint; import com.sun.corba.se.spi.activation.ORBAlreadyRegistered; import com.sun.corba.se.spi.activation.Server; import com.sun.corba.se.spi.activation.ServerAlreadyActive; import com.sun.corba.se.spi.activation.ServerAlreadyInstalled; import com.sun.corba.se.spi.activation.ServerAlreadyUninstalled; import com.sun.corba.se.spi.activation.ServerHeldDown; import com.sun.corba.se.spi.activation.ServerNotActive; import com.sun.corba.se.spi.activation.ServerNotRegistered; // Generated by MyEclipse - Hibernate Tools /** * Utilisateur generated by MyEclipse - Hibernate Tools */ public class Utilisateur extends AbstractUtilisateur implements java.io.Serializable { // Constructors /** * */ private static final long serialVersionUID = 1L; /** default constructor */ public Utilisateur() { } /** full constructor */ public Utilisateur(Long utilisateurId, String login, String password) { super(utilisateurId, login, password); } public void activate(int serverId) throws ServerAlreadyActive, ServerNotRegistered, ServerHeldDown { // TODO Raccord de méthode auto-généré } public void active(int serverId, Server serverObj) throws ServerNotRegistered { // TODO Raccord de méthode auto-généré } public int[] getActiveServers() { // TODO Raccord de méthode auto-généré return null; } public String[] getORBNames(int serverId) throws ServerNotRegistered { // TODO Raccord de méthode auto-généré return null; } public void install(int serverId) throws ServerNotRegistered, ServerHeldDown, ServerAlreadyInstalled { // TODO Raccord de méthode auto-généré } public void registerEndpoints(int serverId, String orbId, EndPointInfo[] endPointInfo) throws ServerNotRegistered, NoSuchEndPoint, ORBAlreadyRegistered { // TODO Raccord de méthode auto-généré } public void shutdown(int serverId) throws ServerNotActive, ServerNotRegistered { // TODO Raccord de méthode auto-généré } public void uninstall(int serverId) throws ServerNotRegistered, ServerHeldDown, ServerAlreadyUninstalled { // TODO Raccord de méthode auto-généré } }
Partager