Advertisement
apuntesdejava

JSONApiPersonaRESTClientWeb/index.jsp

Jun 8th, 2013
3,591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.50 KB | None | 0 0
  1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  2. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  3. <!DOCTYPE html>
  4. <html>
  5.     <head>
  6.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7.         <title>Probando API Json desde Java</title>
  8.     </head>
  9.     <body>
  10.         <h1>Probando API Json desde Java</h1>
  11.         <form method="post"  action='<%= request.getContextPath() + "/PersonaServlet"%>'>
  12.             Nombre: <input name="name" /><br/>
  13.             Sexo: <input name="gender" type="radio" value="H" />Hombre |
  14.             <input name="gender" type="radio" value="M" />Mujer<br/>
  15.             ¿Trabaja? <input name="worker" type="checkbox" value="S" /><br/>
  16.             <input type="submit" value="Enviar" />
  17.             <input type="reset" value="Limpiar" />
  18.         </form>
  19.  
  20.         <jsp:include page="/PersonaServlet" flush="true" />
  21.         <hr/>
  22.         <h2>Resultado</h2>
  23.         <table >
  24.             <thead>
  25.                 <tr>
  26.                     <th>ID</th>
  27.                     <th>Nombre</th>
  28.                     <th>Sexo</th>
  29.                 </tr>
  30.             </thead>
  31.             <tbody>
  32.                 <c:forEach items="${personas}" var="item">
  33.                     <tr>
  34.                         <td>${item.personaId}</td>
  35.                         <td>${item.name}</td>
  36.                         <td>${item.gender}</td>
  37.                     </tr>
  38.                 </c:forEach>
  39.             </tbody>
  40.         </table>
  41.     </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement