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 / updStudente.jsp < prev    next >
Text File  |  2001-04-02  |  2KB  |  78 lines

  1. <%--updStudente.jsp
  2.   Aggiornamento studente
  3. --%>
  4. <%@ page errorPage="/jsp/error.jsp" %>
  5.  
  6. <%@ page import="StudenteBean" %>
  7. <%@ page import="java.text.DateFormat" %>
  8. <%@ page import="java.util.Locale" %>
  9.  
  10.  
  11. <%! DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ITALY); %> 
  12.  
  13. <jsp:useBean id="studente" class="StudenteBean" scope="request" />
  14.  
  15. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  16.       "http://www.w3.org/TR/REC-html40/loose.dtd">
  17.  
  18. <html>
  19. <head>
  20.   <title>
  21.     Gestione studenti
  22.   </title>
  23.   <base href="<%= request.getScheme() %>://<%= request.getServerName()%>:<%= request.getServerPort() %><%= request.getContextPath() %>/">
  24. </head>
  25.  
  26. <body>
  27.   <h1>Aggiornamento studente</h1>
  28.  
  29. <form method="post" action="servlet/Main?cmd=fai-upd">
  30.  
  31. <table border="1">
  32.  
  33. <tr>
  34. <td><strong>Matricola</strong></td>
  35. <td>
  36.   <jsp:getProperty name="studente" property="matricola" />
  37.   <input type="hidden" name="matricola" value="<%= studente.getMatricola().trim() %>">
  38. </td>
  39. </tr>
  40.  
  41. <tr>
  42. <td><strong>Cognome</strong> </td>
  43. <td><input type="text" name="cognome" value="<%= studente.getCognome().trim() %>"></td> 
  44. </tr>
  45.   
  46. <tr>
  47. <td><strong>Nome</strong></td>
  48. <td><input type="text" name="nome" value="<%= studente.getNome().trim() %>"></td> 
  49. </tr>
  50.  
  51. <tr>
  52. <td><strong>Facoltà</strong></td>
  53. <td><input type="text" name="facolta" value="<%= studente.getFacolta().trim() %>"></td>
  54. </tr>
  55.  
  56. <tr>
  57. <td><strong>Data di nascita</strong></td>
  58. <td><input type="text" name="data_nascita" value="<%= df.format(studente.getDataNascita()) %>"></td>
  59. </tr>
  60.  
  61. <tr>
  62. <td><strong>Crediti ottenuti</strong></td>
  63. <td><input type="text" name="crediti_ottenuti" value="<%= studente.getCreditiOttenuti() %>"></td>
  64. </tr>
  65.  
  66. <tr><td align="center" colspan="2"><input type="submit" value="Aggiorna"></td></tr>
  67.  
  68. </table>
  69.  
  70. </form>
  71.  
  72.   <p>
  73.   <a href="http://validator.w3.org/check/referer">Valida il documento</a>
  74.   </p>
  75.  
  76. </body>
  77. </html>
  78.