Ragazzi ho una servlet su cui memorizzo dal db tutti gli elementi col metodo getAll()
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
UtenteDao ud=new UtenteDao();
List<Utente> lista= ud.getAll();
req.setAttribute("lista", lista);
req.getRequestDispatcher("tutti.jsp").forward(req, resp);
}
per visualizzare tutti gli elementi sulla jsp come posso fare?
<%@ 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>Insert title here</title>
</head>
<body>
Lista di tutti gli utenti registrati:
<table border="1">
<td>
<%
?????????????????
%>
</td>
</table>
</body>
</html>
Non so cosa mettere al posto dei "??????????????????????????" potete aiutarmi?
se faccio List lista= request.getAttribute("lista") non posso farlo perche non riconosce List nella jsp