Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@page import="java.util.List"%>
- <%@page import="cl.entity.Departamento"%>
- <%@page import="javax.naming.InitialContext"%>
- <%@page import="cl.bean.ServiciosEmpleadoLocal"%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%! ServiciosEmpleadoLocal servicio; %>
- <%
- InitialContext ctx = new InitialContext();
- servicio = (ServiciosEmpleadoLocal) ctx.lookup("java:global/MantenedorEmpleadosJPA/MantenedorEmpleadosJPA-ejb/ServiciosEmpleado!cl.bean.ServiciosEmpleadoLocal");
- List<Departamento> listaDep = servicio.getDepartamento();
- %>
- <c:set scope="page" var="lista" value="<%= listaDep %>" />
- <!DOCTYPE html>
- <html>
- <head>
- <!--Import Google Icon Font-->
- <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <!--Import materialize.css-->
- <link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
- <!--Let browser know website is optimized for mobile-->
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Gestión de Departamentos</title>
- </head>
- <body>
- <div class="container">
- <div class="row">
- <div class="col s12">
- <c:import url="nav.jsp"/>
- </div>
- </div>
- <h3 class="center-align">Mantenedores - Departamento</h3>
- <div class="row card-panel z-depth-5 ">
- <form action="adddep.do" method="post"
- class="card-panel col s8 offset-s2">
- <div class="row">
- <div class="input-field col s12 ">
- <i class="material-icons prefix">payment</i>
- <input id="icon_nombre" type="text" class="validate"
- name="txtNombre">
- <label for="icon_nombre">Nombre</label>
- </div>
- </div>
- <div class="input-field col s6">
- <button class="btn waves-effect waves-light" type="submit" name="action">
- Agregar
- <i class="material-icons right">done_all</i>
- </button>
- </div>
- </form>
- <div class="col s8 offset-s2">
- <p style="color:red;">${requestScope.msg}</p>
- </div>
- </div>
- <div class="row">
- <div class="card-panel col s8 offset-s2 z-depth-5">
- <!-- Tabla de Productos -->
- <table class="bordered highlight">
- <thead>
- <tr>
- <th>Código</th>
- <th>Nombre</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="d" items="${lista}">
- <tr>
- <td>${d.codDepartamento}</td>
- <td>${d.nombre}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div><!-- fin container -->
- <!--Import jQuery before materialize.js-->
- <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
- <script type="text/javascript" src="js/materialize.min.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement