请问这个jstl代码有什么问题?我看不到它的内容。
我的 accueil.jsp 页面的内容
<table>
<tr>
<th><c:out value="Numéro de compte"/></th>
<th><c:out value="Date création"/></th>
<th><c:out value="Date mise-à-jour"/></th>
<th><c:out value="Libelle"/></th>
<th><c:out value="Type devise"/></th>
<th><c:out value="Situation compte"/></th>
</tr>
<c:forEach items="${ sessionScope.listCpts }" var="liste">
<tr>
<td><a href="<c:url value="/menu"/>">${ liste.value.rib }</a></td>
<td>${ liste.value.dateCréation }</td>
<td>${ liste.value.dateMaj }</td>
<td>${ liste.value.libelle }</td>
<td>${ liste.value.typeDevise }</td>
<td>${ liste.value.situationCompte }</td>
</tr>
</c:forEach>
</table>
我的 doPost 方法
public static final String ATT_LIST_CPT = "listCpts";
public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
ConnexionForm form = new ConnexionForm();
User user = form.connecterUser( request );
ServiceService service = new ServiceService();
tn.bh.services.client.Service srvc = service.getServicePort();
List<Compte> listCpts = srvc.consulterListeCpt(user.getIdentifiant());
HttpSession session = request.getSession();
request.setAttribute( ATT_LIST_CPT, listCpts );
request.setAttribute( ATT_FORM, form );
request.setAttribute( ATT_USER, user );
if ( form.getErreurs().isEmpty() ) {
session.setAttribute( ATT_SESSION_USER, user );
response.sendRedirect( request.getContextPath() + "/accueil" );
} else {
session.setAttribute( ATT_SESSION_USER, null );
this.getServletContext().getRequestDispatcher( VUE ).forward( request, response );
}
}
这看起来像我生成的 html 页面。请注意,我的列表 (listCpts) 已填满。