Bonsoir tout le monde
J'espère que vous allez bien
question d'un débutant en JEE
j'ai une servlet me permet de chercher des personnes dans une base de données Mysql ensuit elle renvoie une list vers une page JSP avant l'utilisation des taglib la page affiche la liste normalement (avec une boucle for en java ,getters ... ) . j'ai ajouter les jar de lib standard normal. mais pendant l'exécution tomcat me renvoie html avec les nom des attribues!
voici le code de la page jsp IHM pour la recherche :
voici le code la page consacré a la modification d'une personne (les paramètre envoyé par la page de recherche a l'aide des taglib) :
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 <%@page import="java.util.ArrayList"%> <%@page import="com.formation.personne.Personnes"%> <%@page import="java.util.List"%> <%@page import="java.io.*"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="/WEB-INF/tldfolder/c.tld" prefix="c" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Chercher une personne</title> </head> <body> <form action="Serv_PersonneList"> <table> <tr> <td>Nom <input name="nom"></td> </tr> <tr> <td>Prenom <input name="prenom" > </td> </tr> <tr> <td> <input type="submit" value="chercher"></td> </tr> </table> </form> <table> <c:forEach var="personne" items="${list_personne}"> <tr> <td> <c:out value="${personne.id}"/> </td> <td> <c:out value="${personne.nom}"/> </td> <td> <c:out value="${personne.prenom}"/> </td> <td><a href="<c:url value="mdification.jsp?id=${personne.id}&nom=${personne.nom}&prenom=${personne.prenom}"/>"> "Modifier"</a></td> <!-- <td><a href="<c:url value="delete.jsp?id=${personne.id}"/>">Supprimer</a></td> --> </tr> </c:forEach> </table> </body> </html>
dans une pièce jointe une capture de l'exécution
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 <%@page import="java.util.*" %> <%@ 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> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Modifier/ Supprimer </title> </head> <body> <form action="Serv_Modifier"> <table> <tr> <td><input name="id" value=<%=request.getParameter("id")%> type="hidden" /></td> </tr> <tr> <td>nom<input name="nom" value=<%=request.getParameter("nom")%> /></td> </tr> <tr> <td>prenom <td> <input name="prenom" value=<%=request.getParameter("prenom")%> /></td> </tr> <tr> <td><input name="modifier" value="modifier" type="submit" ></td> </tr> </table> </form> </body> </html>
cordialement
Partager