Probleme jstl

oussama112 Messages postés 8 Date d'inscription vendredi 3 décembre 2010 Statut Membre Dernière intervention 29 octobre 2012 - 10 déc. 2010 à 23:40
oussama112 Messages postés 8 Date d'inscription vendredi 3 décembre 2010 Statut Membre Dernière intervention 29 octobre 2012 - 10 déc. 2010 à 23:40
Bonjour;

Je souhaite me servir de la session comme temps d'inactivité sur mon site.

qaund j'utilise le jsp mon code marche tres bien par contre au jstl ça marche pas
voici mes deux code :

avec jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="com.bankonet.model.*"%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>

<!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>Insert title here</title>
</head>

Comptes Courants

Intitulé,
Solde,
Découvert autorisé,

----

<%

try {
HttpSession session1=request.getSession(true);
Client c = (Client)session1.getAttribute(\"client\");
List list = c.getCompteCourantList();
Iterator it = list.iterator();
while(it.hasNext())
{ CompteCourant compte = (CompteCourant) it.next();

out.print(\"----
\");
out.print(\"" + " " + compte.getLibelle() + " " + ", \");
out.print(\"" + " " + compte.getSolde() + " " + ", \");
out.print(\"" + " " + compte.getDecouvertAutorise() + " " + ", \");
out.print(\"\");}
}catch(Exception ex){

System.out.println(\"erreur\"+ex.getStackTrace().toString());
}
%>


</html>



avec jstl :
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!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>Insert title here</title>
</head>

Comptes Epargne

Intitulé,
Solde,
Taux d'interet,
Plafond,

<c:forEach items=\"${c.CompteEpargne}\" var=\"compte\" >
----

<c:out value="${compte.getLibelle()}" />,
<c:out value="${compte.getSolde()}" />,
<c:out value="${compte.getTaux()}" />,
<c:out value="${compte.getPlafond()}" />,

</c:forEach>


</html>

1 réponse

oussama112 Messages postés 8 Date d'inscription vendredi 3 décembre 2010 Statut Membre Dernière intervention 29 octobre 2012
10 déc. 2010 à 23:40
Pouvez-vous m'aider merci
soit a corriger la source ou une autre solution
0
Rejoignez-nous