diff --git a/ear/.settings/org.eclipse.wst.common.component b/ear/.settings/org.eclipse.wst.common.component index c0c7dfccd10befa3fc53f2dce8a83b13f6f6c3b9..ad5a52930ece715c5594e0b6c7e8a302cf50ef27 100644 --- a/ear/.settings/org.eclipse.wst.common.component +++ b/ear/.settings/org.eclipse.wst.common.component @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> - + + @@ -10,7 +11,8 @@ <wb-module deploy-name="practico1"> - + + @@ -21,7 +23,8 @@ <wb-resource deploy-path="/" source-path="/target/m2e-wtp/ear-resources"/> - + + @@ -38,7 +41,8 @@ <dependent-module archiveName="practico1-web.war" deploy-path="/" handle="module:/resource/practico1-web/practico1-web"> <dependency-type>uses</dependency-type> </dependent-module> - + + @@ -49,7 +53,8 @@ </wb-module> - + + diff --git a/ear/target/m2e-wtp/.gitignore b/ear/target/m2e-wtp/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ee6758a9be13287d933b5be94df8d2ae342e47a7 --- /dev/null +++ b/ear/target/m2e-wtp/.gitignore @@ -0,0 +1 @@ +/ear-resources/ diff --git a/ear/target/m2e-wtp/ear-resources/META-INF/maven/tse/practico1-ear/pom.properties b/ear/target/m2e-wtp/ear-resources/META-INF/maven/tse/practico1-ear/pom.properties index bc21c9261c258a93bd6d7ca504ce63417934cd0d..c9f8bffe3a53326742ed2b47050c7db9471ef4bf 100644 --- a/ear/target/m2e-wtp/ear-resources/META-INF/maven/tse/practico1-ear/pom.properties +++ b/ear/target/m2e-wtp/ear-resources/META-INF/maven/tse/practico1-ear/pom.properties @@ -1,7 +1,7 @@ #Generated by Maven Integration for Eclipse -#Sun Sep 15 01:54:43 BRT 2024 +#Mon Sep 16 00:40:00 BRT 2024 artifactId=practico1-ear groupId=tse -m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico1\\ear +m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico-1-tse\\ear m2e.projectName=practico1-ear version=0.0.1-SNAPSHOT diff --git a/ejb/target/classes/META-INF/maven/tse/practico1-ejb/pom.properties b/ejb/target/classes/META-INF/maven/tse/practico1-ejb/pom.properties index 9c29a28623139147bc3d52248a3297689fd86ac3..21d14453dcfe5273f68725302f41a92685d12378 100644 --- a/ejb/target/classes/META-INF/maven/tse/practico1-ejb/pom.properties +++ b/ejb/target/classes/META-INF/maven/tse/practico1-ejb/pom.properties @@ -1,7 +1,7 @@ #Generated by Maven Integration for Eclipse -#Sun Sep 15 01:54:44 BRT 2024 +#Mon Sep 16 00:40:00 BRT 2024 artifactId=practico1-ejb groupId=tse -m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico1\\ejb +m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico-1-tse\\ejb m2e.projectName=practico1-ejb version=0.0.1-SNAPSHOT diff --git a/practico1-data/target/classes/META-INF/maven/tse/practico1-data/pom.properties b/practico1-data/target/classes/META-INF/maven/tse/practico1-data/pom.properties index eccb2dde50894b6b5e502f9d791e1becd18ffc55..7b3a6618fcbf8f804bcc055d5baaa691e7baa5e0 100644 --- a/practico1-data/target/classes/META-INF/maven/tse/practico1-data/pom.properties +++ b/practico1-data/target/classes/META-INF/maven/tse/practico1-data/pom.properties @@ -1,7 +1,7 @@ #Generated by Maven Integration for Eclipse -#Sun Sep 15 01:54:43 BRT 2024 +#Mon Sep 16 00:40:00 BRT 2024 artifactId=practico1-data groupId=tse -m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico1\\practico1-data +m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico-1-tse\\practico1-data m2e.projectName=practico1-data version=0.0.1-SNAPSHOT diff --git a/web/src/main/webapp/detalle_usuario.jsp b/web/src/main/webapp/detalle_usuario.jsp index b0262eee6c8c2b568dfae2d9797f5e3018ccaddb..1e076a2a0fec906838af08088620d69a7a41e2e1 100644 --- a/web/src/main/webapp/detalle_usuario.jsp +++ b/web/src/main/webapp/detalle_usuario.jsp @@ -2,6 +2,16 @@ <%@ page import="tse.practico1.Usuario" %> <html> <head> +<style> + body, html { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #f0f0f0; + flex-direction: column; + } + </style> <meta charset="UTF-8"> <title>Práctico 1</title> </head> diff --git a/web/src/main/webapp/index.jsp b/web/src/main/webapp/index.jsp index 2c0f8a2a5b0154b50eecf5f65fa4fdf5711bf070..cdbb47de0ef51e778f38328a4a5be21862c4861d 100644 --- a/web/src/main/webapp/index.jsp +++ b/web/src/main/webapp/index.jsp @@ -1,20 +1,49 @@ <!DOCTYPE html> <html> <head> + <style> + body, html { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #f0f0f0; + flex-direction: column; + gap: 10px; + } + + #crearUsuarioForm, #buscarUsuarioForm { + display: flex; + gap: 5px; + justify-content: center; + align-items: center; + flex-direction: column; + padding-bottom: 10px; + } + + #crearUsuarioFields { + display: flex; + align-items: flex-start; + flex-direction: column; + gap: 5px; + } + </style> <meta charset="UTF-8"> <title>Inicio</title> </head> <body> -<form action="detalle_usuario" method="POST"> +<form action="detalle_usuario" method="POST" id="buscarUsuarioForm"> <h3>Buscar Usuario</h3> Ingrese el nombre del Usuario: <input name="nombreBuscado" required/> <button type="submit">Buscar Usuario</button> </form> -<form action="usuario_creado" method="POST"> +<form action="usuario_creado" method="POST" id="crearUsuarioForm"> <h3>Crear Usuario</h3> - <label>Nombre: <input name="nombre" required/></label> - <label>Año de Nacimiento: <input name="añoNacimiento" required/></label> - <label>Fecha de Registro: <input name="fechaRegistro" required/></label> + <div id="crearUsuarioFields"> + <label>Nombre: <input name="nombre" required/></label> + <label>Año de Nacimiento: <input name="añoNacimiento" required/></label> + <label>Fecha de Registro: <input name="fechaRegistro" required/></label> + </div> <button type="submit">Crear nuevo Usuario</button> </form> <form action="lista_usuarios" method="POST"> diff --git a/web/src/main/webapp/lista_usuarios.jsp b/web/src/main/webapp/lista_usuarios.jsp index f848f3116f0ef7efdc45a6ee1a8a84ea345091b5..f7690c662c868785bdbb7d5c7a283492c8052bc3 100644 --- a/web/src/main/webapp/lista_usuarios.jsp +++ b/web/src/main/webapp/lista_usuarios.jsp @@ -3,11 +3,48 @@ <%@ page import="tse.practico1.Usuario" %> <html> <head> +<style> + body, html{ + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + background-color: #f0f0f0; + } + #tabla { + display: flex; + align-items: center; + flex-direction: column; + width: 500px; + border-collapse: collapse; + font-family: Arial, sans-serif; + } + #tabla#fila{ + align-self: start; + justify-self; start; + } + + th, td { + padding: 12px; + text-align: left; + border-bottom: 1px solid #ddd; + } + + th { + background-color: #f4f4f4; + color: #333; + } + + tr:nth-child(even) { + background-color: #f9f9f9; + }</style> <meta charset="UTF-8"> <title>Práctico 1</title> </head> <body> -<h2>Usuarios:</h3> +<h2>Usuarios:</h2> +<div id="tabla"> + <% // Recuperamos el array enviado desde el servlet @@ -18,12 +55,14 @@ for (Usuario item : usuarios) { %> <h3>Datos del Usuario: </h2> - <li>Nombre: <%= item.getNombre() %></li> - <li>Año de nacimiento: <%= item.getAñoNacimiento() %></li> - <li>Fecha de registro: <%= item.getFechaRegistro() %></li> + <li id="fila">Nombre: <%= item.getNombre() %></li> + <li id="fila">Año de nacimiento: <%= item.getAñoNacimiento() %></li> + <li id="fila">Fecha de registro: <%= item.getFechaRegistro() %></li> <% } } %> +</div> + </body> </html> \ No newline at end of file diff --git a/web/src/main/webapp/usuario_creado.jsp b/web/src/main/webapp/usuario_creado.jsp index da6176df9cf924521925d9093bcb24c6f63b31d2..ea200a7941ff3650809862fc006099e189d406dd 100644 --- a/web/src/main/webapp/usuario_creado.jsp +++ b/web/src/main/webapp/usuario_creado.jsp @@ -1,6 +1,16 @@ <!DOCTYPE html> <html> <head> +<style> + body, html { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #f0f0f0; + flex-direction: column; + } + </style> <meta charset="UTF-8"> <title>Práctico 1</title> </head> diff --git a/web/target/m2e-wtp/web-resources/.gitignore b/web/target/m2e-wtp/web-resources/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..3385916da52dc526118c7c76899e628cdde10ca1 --- /dev/null +++ b/web/target/m2e-wtp/web-resources/.gitignore @@ -0,0 +1 @@ +/META-INF/ diff --git a/web/target/m2e-wtp/web-resources/META-INF/maven/tse/practico1-web/pom.properties b/web/target/m2e-wtp/web-resources/META-INF/maven/tse/practico1-web/pom.properties index 8ee3d1cfe62f0d108e8e9be19ca4ef210607e7a6..0c907aa3efdcbcea29fd9ec9fccb063aacb9a89e 100644 --- a/web/target/m2e-wtp/web-resources/META-INF/maven/tse/practico1-web/pom.properties +++ b/web/target/m2e-wtp/web-resources/META-INF/maven/tse/practico1-web/pom.properties @@ -1,7 +1,7 @@ #Generated by Maven Integration for Eclipse -#Sun Sep 15 11:36:25 BRT 2024 +#Mon Sep 16 00:40:07 BRT 2024 artifactId=practico1-web groupId=tse -m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico1\\web +m2e.projectLocation=C\:\\Users\\fedma\\eclipse-workspace\\practico-1-tse\\web m2e.projectName=practico1-web version=0.0.1-SNAPSHOT