[Struts 1.3] cannot find bean
Bonjour, j'ai un souci que je ne pige pas du tout
J'ai une erreur 500, suite à une JspException: cannot find bean: "LISTE_COURSES" in any scope.
Je précise je débute en Struts , et la j'arrive à saturation. J'aimerais déjà savoir à quoi sert le champs "name" dans:
Code:
<logic:iterate id="elementCourse" name="LISTE_COURSES" type="com.monapplication.ElementCourseBean">
Cela fait 2 jours que je cherche et, je ne trouve pas ou je ne comprend pas,
parce que je n'ai nul part de "LISTE_COURSES"!!
Et voici mon Struts-config.xml
Code:
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="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<struts-config>
<!-- ========== Mapping des actions ============================== -->
<action-mappings>
<action path = "/AfficherListeCourses"
type = "com.monapplication.AfficherListeCoursesAction"
scope = "request">
<forward name="succes" path="/pages/listeCourses.jsp" />
<forward name="erreur" path="/pages/erreur.jsp" />
</action>
</action-mappings>
<!-- ========== Ressources de definitions de messages =========================== -->
<message-resources parameter="Resources" /><!-- fichier resources.properties -->
</struts-config> |
et listeCourses.jsp
Code:
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
| <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<html:html>
<head>
<title><bean:message key="titre.listecourses"/></title>
</head>
<body>
<table border="1">
<thead>
<tr>
<th><bean:message key="colonne.identifiant"/></th>
<th><bean:message key="colonne.libelle"/></th>
<th><bean:message key="colonne.quantite"/></th>
</tr>
</thead>
<tbody>
<logic:iterate id="elementCourse" name="LISTE_COURSES" type="com.monapplication.ElementCourseBean">
<tr>
<td><bean:write name="elementCourse" property="idObjet"/></td>
<td><bean:write name="elementCourse" property="libelle"/></td>
<td><bean:write name="elementCourse" property="quantite"/></td>
</tr>
</logic:iterate>
</tbody>
</table>
</body>
</html:html> |
Merci d'avance