Advertisement
Guest User

Untitled

a guest
Jun 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 KB | None | 0 0
  1. <c:choose>
  2.     <c:when test="${sessionScope['usuario'] != null }">
  3.         <jsp:include page="/jsp/cabecalho_logado.jsp" />
  4.     </c:when>
  5.     <c:otherwise>
  6.         <jsp:include page="/jsp/cabecalho_deslogado.jsp" />
  7.     </c:otherwise>
  8. </c:choose>
  9.  
  10. <sql:setDataSource var="connection"
  11.     driver="org.apache.derby.jdbc.ClientDriver"
  12.     url="jdbc:derby://localhost:1527/WebContent/banco/movies_jstl"
  13.     user="utfpr" password="utfpr" scope="session" />
  14.  
  15. <sql:query var="seleciona_filmes" dataSource="${connection }">
  16. select * from filme
  17. </sql:query>
  18.  
  19. UTFPR MOVIES
  20. <table border="1">
  21.     <tr>
  22.         <th colspan="6">Lista de Filmes</th>
  23.     </tr>
  24.     <tr>
  25.         <th>Título</th>
  26.         <th>Gênero</th>
  27.         <th>Ano</th>
  28.         <th>Audio</th>
  29.         <th>Legenda</th>
  30.     </tr>
  31.     <c:forEach var="lista" items="${seleciona_filmes.rows}">
  32.         <tr>
  33.             <td><c:out value="${lista.titulo}"/></td>
  34.             <td><c:out value="${lista.genero}" /></td>
  35.             <td><c:out value="${lista.ano}" /></td>
  36.             <td><c:out value="${lista.audio}" /></td>
  37.             <td><c:out value="${lista.legenda}" /></td>
  38.             <td><a href="/movies_jstl/servlets/LoginAction?id_filme=<c:out value="${lista.idfilme}"/>">Assistir</a></td>
  39.         </tr>
  40.     </c:forEach>
  41. </table>
  42. </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement