home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.disi.unige.it
/
2015-02-11.ftp.disi.unige.it.tar
/
ftp.disi.unige.it
/
pub
/
.person
/
CataniaB
/
teach-act
/
DB3
/
servlet-bean-jsp
/
visTuttiStudenti.jsp
< prev
Wrap
Text File
|
2001-04-02
|
2KB
|
61 lines
<%--visTuttiStudenti.jsp
Stampa i dati di un studente
--%>
<%@ page errorPage="/jsp/error.jsp" %>
<%@ page import="StudenteBean" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.util.Locale" %>
<%! DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ITALY); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>
Gestione studenti
</title>
<base href="<%= request.getScheme() %>://<%= request.getServerName()%>:<%= request.getServerPort() %><%= request.getContextPath() %>/">
</head>
<body>
<h1>Lista studenti</h1>
<% Vector lista = (Vector)request.getAttribute("listaStudenti");
StudenteBean studente = new StudenteBean(); %>
<table border="1">
<tr>
<td><strong>Matricola</strong></td>
<td><strong>Cognome</strong> </td>
<td><strong>Nome</strong></td>
<td><strong>Facoltà</strong></td>
<td><strong>Data di nascita</strong></td>
<td><strong>Crediti ottenuti</strong></td>
</tr>
<% for (int i=0; i<lista.size(); i++) {
studente = (StudenteBean) lista.get(i); %>
<tr>
<td><%= studente.getMatricola() %></td>
<td><%= studente.getCognome() %></td>
<td><%= studente.getNome() %></td>
<td><%= studente.getFacolta() %></td>
<td><%= df.format(studente.getDataNascita()) %></td>
<td><%= studente.getCreditiOttenuti() %></td>
</tr>
<% } %>
</table>
<p>
<a href="http://validator.w3.org/check/referer">Valida il documento</a>
</p>
</body>
</html>