<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<jsp:useBean id="list" type="java.util.Collection" scope="request"/>
<!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>Risultati ricerca</title>
</head>
<body>
<h1>Risultati ricerca</h1>
<%
if (list.isEmpty()){
//Nessun utente trovato
out.println("<p>Nessun utente trovato!</p>");
}else{
out.println("<table>");
//Itero e mostro i risultati in forma di tabella
java.util.Iterator it=list.iterator();
while(it.hasNext()){
it.html.ejb.entity.cmp.UserLocal user=(it.html.ejb.entity.cmp.UserLocal)it.next();
out.println("<tr>");
out.println("<td><a href=\"controller?op=load&login="+user.getLogin()+"\">"+user.getNome()+" "+user.getCognome()+"</a></td>");
out.println("<td>"+user.getEmail()+"</td>");
out.println("</tr>");
}
out.println("</table>");
}
%>
</body>
</html>