diff --git a/.gitignore b/.gitignore index 049313d..b3a52f7 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ target/ .settings .springBeans .sts4-cache +.hola jose ### NetBeans ### /nbproject/private/ diff --git a/pom.xml b/pom.xml index 967ae10..9b4ec8b 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,12 @@ ${junit.version} test + + org.postgresql + postgresql + 42.3.5 + + diff --git a/src/main/java/com/roshka/proyectofinal/DataBase.java b/src/main/java/com/roshka/proyectofinal/DataBase.java new file mode 100644 index 0000000..13fdb92 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/DataBase.java @@ -0,0 +1,28 @@ +package com.roshka.proyectofinal; + +import java.sql.Connection; +import java.sql.DriverManager; + +public class DataBase { + + public static Connection getConnection(){ + Connection con=null; + try{ + Class.forName("org.postgresql.Driver"); + con= DriverManager + .getConnection("jdbc:postgresql://localhost:5432/Bootcamp_th", + "postgres", "postgres"); + + if(con != null){ + System.out.println("---> CONNECTED TO SERVER"); + }else { + System.out.println("---> UNABLE TO CONNECTED TO SERVER"); + } + }catch(Exception e){ + e.printStackTrace(); + System.err.println(e.getClass().getName()+": "+e.getMessage()); + System.exit(0); + } + return con; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/LoginHandler.java b/src/main/java/com/roshka/proyectofinal/LoginHandler.java new file mode 100644 index 0000000..4d7999f --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/LoginHandler.java @@ -0,0 +1,52 @@ +package com.roshka.proyectofinal; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; + +import java.io.*; + +public class LoginHandler extends HttpServlet { + + public void doPost(HttpServletRequest req, HttpServletResponse res) + throws ServletException, IOException { + res.setContentType("text/html"); + PrintWriter out = res.getWriter(); + + // Get the user's name and password + String name = req.getParameter("name"); + String passwd = req.getParameter("passwd"); + + // Check the name and password for validity + if (!allowUser(name, passwd)) { + out.println("<HTML><HEAD><TITLE>Access Denied</TITLE></HEAD>"); + out.println("<BODY>Your login and password are invalid.<BR>"); + out.println("You may want to <A HREF=\"/login.html\">try again</A>"); + out.println("</BODY></HTML>"); + } + else { + // Valid login. Make a note in the session object. + HttpSession session = req.getSession(true); + session.putValue("logon.isDone", name); // just a marker object + + // Try redirecting the client to the page he first tried to access + try { + String target = (String) session.getValue("login.target"); + if (target != null) + res.sendRedirect(target); + return; + } + catch (Exception ignored) { } + + // Couldn't redirect to the target. Redirect to the site's home page. + res.sendRedirect(req.getScheme() + "://" + + req.getServerName() + ":" + req.getServerPort()); + } + } + + protected boolean allowUser(String user, String passwd) { + return true; // trust everyone + } +} \ No newline at end of file diff --git a/src/main/java/com/roshka/proyectofinal/ProtectedResource.java b/src/main/java/com/roshka/proyectofinal/ProtectedResource.java new file mode 100644 index 0000000..9c45921 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/ProtectedResource.java @@ -0,0 +1,30 @@ +package com.roshka.proyectofinal; + +import java.io.*; +import java.util.*; +import jakarta.servlet.*; +import jakarta.servlet.http.*; + +public class ProtectedResource extends HttpServlet { + + public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + res.setContentType("text/plain"); + PrintWriter out = res.getWriter(); + + // Get the session + HttpSession session = req.getSession(true); + + // Does the session indicate this user already logged in? + Object done = session.getValue("logon.isDone"); + // marker object + if (done == null) { + // No logon.isDone means he hasn't logged in. // Save the request URL as the true target and redirect to the login page + session.putValue("login.target", + HttpUtils.getRequestURL(req).toString()); res.sendRedirect(req.getScheme() + "://" + req.getServerName() + ":" + + req.getServerPort() + "/login.html"); + return; + } + // If we get here, the user has logged in and can see the goods + out.println("Unpublished O'Reilly book manuscripts await you!"); + } + } \ No newline at end of file diff --git a/src/main/java/com/roshka/proyectofinal/bootcamp/BootcampDao.java b/src/main/java/com/roshka/proyectofinal/bootcamp/BootcampDao.java new file mode 100644 index 0000000..0edd82f --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/bootcamp/BootcampDao.java @@ -0,0 +1,36 @@ +package com.roshka.proyectofinal.bootcamp; + +import com.roshka.proyectofinal.DataBase; +import com.roshka.proyectofinal.entity.Bootcamp; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; + +public class BootcampDao { + + public static int save(Bootcamp b){ + int status=0; + + try{ + Connection con= DataBase.getConnection(); + PreparedStatement ps=con.prepareStatement( + "insert into bootcamp (id_lenguaje,id_profesor,fecha_inicio,fecha_fin,descripcion,imagen,titulo,activo) values (?,?,?,?,?,?,?,?)"); + ps.setInt(1,b.getId_lenguaje()); + ps.setInt(2,b.getId_profesor()); + ps.setString(3,b.getFecha_inicio()); + ps.setString(4,b.getFecha_fin()); + ps.setString(5,b.getDescripcion()); + ps.setString(6,b.getImagen()); + ps.setString(7,b.getTitulo()); + ps.setBoolean(8,b.getActivo()); + + status=ps.executeUpdate(); + + con.close(); + }catch(Exception ex){ex.printStackTrace();} + + return status; + } + +} diff --git a/src/main/java/com/roshka/proyectofinal/bootcamp/SaveServlet.java b/src/main/java/com/roshka/proyectofinal/bootcamp/SaveServlet.java new file mode 100644 index 0000000..d931473 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/bootcamp/SaveServlet.java @@ -0,0 +1,45 @@ +package com.roshka.proyectofinal.bootcamp; + +import com.roshka.proyectofinal.entity.Bootcamp; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; + +public class SaveServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + int id_lenguaje= Integer.parseInt(request.getParameter("id_lenguaje")); + int id_profesor= Integer.parseInt(request.getParameter("id_profesor")); + String fecha_inicio=request.getParameter("fecha_inicio"); + String fecha_fin=request.getParameter("fecha_fin"); + String descripcion=request.getParameter("descripcion"); + String imagen=request.getParameter("imagen"); + String titulo=request.getParameter("titulo"); + String activoStr=request.getParameter("activo"); + Boolean activo = false; + if ( activoStr == "on" ) { + activo = true; + } + + + + Bootcamp b =new Bootcamp( id_lenguaje, id_profesor, fecha_inicio, fecha_fin, descripcion, imagen, titulo, activo); + + int status= BootcampDao.save(b); + if(status>0){ + out.print("

Record saved successfully!

"); + request.getRequestDispatcher("index.html").include(request, response); + }else{ + out.println("Sorry! unable to save record"); + } + + out.close(); + } +} diff --git a/src/main/java/com/roshka/proyectofinal/entity/Bootcamp.java b/src/main/java/com/roshka/proyectofinal/entity/Bootcamp.java new file mode 100644 index 0000000..af84e5a --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/Bootcamp.java @@ -0,0 +1,92 @@ +package com.roshka.proyectofinal.entity; + +public class Bootcamp { + private int id, id_lenguaje, id_profesor; + private String fecha_inicio,fecha_fin,descripcion,imagen,titulo; + private boolean activo; + + public Bootcamp() { + + } + + public Bootcamp(int id_lenguaje, int id_profesor, String fecha_inicio, String fecha_fin, String descripcion, String imagen, String titulo, boolean activo) { + this.id_lenguaje = id_lenguaje; + this.id_profesor = id_profesor; + this.fecha_inicio = fecha_inicio; + this.fecha_fin = fecha_fin; + this.descripcion = descripcion; + this.imagen = imagen; + this.titulo = titulo; + this.activo = activo; + } + + public int getId() { + return id; + } + + public int getId_lenguaje() { + return id_lenguaje; + } + + public void setId_lenguaje(int id_lenguaje) { + this.id_lenguaje = id_lenguaje; + } + + public int getId_profesor() { + return id_profesor; + } + + public void setId_profesor(int id_profesor) { + this.id_profesor = id_profesor; + } + + public String getFecha_inicio() { + return fecha_inicio; + } + + public void setFecha_inicio(String fecha_inicio) { + this.fecha_inicio = fecha_inicio; + } + + public String getFecha_fin() { + return fecha_fin; + } + + public void setFecha_fin(String fecha_fin) { + this.fecha_fin = fecha_fin; + } + + public String getDescripcion() { + return descripcion; + } + + public void setDescripcion(String descripcion) { + this.descripcion = descripcion; + } + + public String getImagen() { + return imagen; + } + + public void setImagen(String imagen) { + this.imagen = imagen; + } + + public String getTitulo() { + return titulo; + } + + public void setTitulo(String titulo) { + this.titulo = titulo; + } + + public boolean getActivo() { + return activo; + } + + public void setActivo(boolean activo) { + this.activo = activo; + } + +} + diff --git a/src/main/java/com/roshka/proyectofinal/entity/Lenguaje.java b/src/main/java/com/roshka/proyectofinal/entity/Lenguaje.java new file mode 100644 index 0000000..3854cb2 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/Lenguaje.java @@ -0,0 +1,18 @@ +package com.roshka.proyectofinal.entity; + +public class Lenguaje { + private int id; + private String nombre_lenguaje; + + public Lenguaje() { + + } + + public String getNombre_lenguaje() { + return nombre_lenguaje; + } + + public void setNombre_lenguaje(String nombre_lenguaje) { + this.nombre_lenguaje = nombre_lenguaje; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/entity/LoginBean.java b/src/main/java/com/roshka/proyectofinal/entity/LoginBean.java new file mode 100644 index 0000000..9b2ad7e --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/LoginBean.java @@ -0,0 +1,22 @@ +package com.roshka.proyectofinal.entity; + +public class LoginBean { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setPassword(String password) { + this.password = password; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/entity/Postulante.java b/src/main/java/com/roshka/proyectofinal/entity/Postulante.java new file mode 100644 index 0000000..459696f --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/Postulante.java @@ -0,0 +1,100 @@ +package com.roshka.proyectofinal.entity; + + +//Creacion del objeto Postulante +public class Postulante { + + private int id,nroCedula,bootcampId; + private String nombre,apellido,telefono,direccion,correo; + private boolean expLaboral,estudioUniversitario,notebook,aceptado; + + //Los parametros que reciban los metodos get estaran en ingles con camelCase para evitar confusiones + + + public Postulante() { + } + + public Postulante(int nroCedula, String nombre, String apellido, String telefono, String direccion, String correo, boolean expLaboral, boolean estudioUniversitario, boolean notebook, int bootcampId, boolean aceptado) { + this.nroCedula = nroCedula; + this.nombre = nombre; + this.apellido = apellido; + this.telefono = telefono; + this.direccion = direccion; + this.correo = correo; + this.expLaboral = expLaboral; + this.estudioUniversitario = estudioUniversitario; + this.notebook = notebook; + this.bootcampId = bootcampId; + this.aceptado = aceptado; + } + public int getId() { + return id; + } + public int getNro_cedula() { + return nroCedula; + } + public void setNro_cedula(int card_id) { + this.nroCedula = card_id; + } + public String getNombre() { + return nombre; + } + public void setNombre(String name) { + this.nombre = name; + } + public String getApellido() { + return apellido; + } + public void setApellido(String lastName) { + this.apellido = lastName; + } + public String getTelefono() { + return telefono; + } + public void setTelefono(String telephone) { + this.telefono = telephone; + } + public String getDireccion() { + return direccion; + } + public void setDireccion(String addres) { + this.direccion = addres; + } + public String getCorreo() { + return correo; + } + public void setCorreo(String email) { + this.correo = email; + } + public boolean getExpLaboral(){ + return expLaboral; + } + public void setExpLaboral(boolean laboralExperience){ + this.expLaboral = laboralExperience; + } + public boolean getEstudioUniversitario(){ + return estudioUniversitario; + } + public void setEstudioUniversitario(boolean university){ + this.estudioUniversitario = university; + } + public boolean getNotebook(){ + return notebook; + } + public void setNotebook(boolean notebook){ + this.notebook = notebook; + } + public boolean getAceptado(){ + return aceptado; + } + public void setAceptado(boolean acepted){ + this.aceptado = acepted; + } + public int getBootcampId(){ + return bootcampId; + } + public void setBootcampId(int bootcampId){ + this.bootcampId = bootcampId; + } + +} diff --git a/src/main/java/com/roshka/proyectofinal/entity/Profesor.java b/src/main/java/com/roshka/proyectofinal/entity/Profesor.java new file mode 100644 index 0000000..94ee265 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/Profesor.java @@ -0,0 +1,49 @@ +package com.roshka.proyectofinal.entity; + +public class Profesor { + private int id,nro_cedula; + private String nombre,apellido,correo; + + public Profesor() { + + } + + public Profesor(int nro_cedula, String nombre, String apellido, String correo) { + this.nro_cedula = nro_cedula; + this.nombre = nombre; + this.apellido = apellido; + this.correo = correo; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getApellido() { + return apellido; + } + + public void setApellido(String apellido) { + this.apellido = apellido; + } + + public String getCorreo() { + return correo; + } + + public void setCorreo(String correo) { + this.correo = correo; + } + + public int getNro_cedula() { + return nro_cedula; + } + + public void setNro_cedula(int nro_cedula) { + this.nro_cedula = nro_cedula; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/entity/Usuario.java b/src/main/java/com/roshka/proyectofinal/entity/Usuario.java new file mode 100644 index 0000000..d307639 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/entity/Usuario.java @@ -0,0 +1,53 @@ +package com.roshka.proyectofinal.entity; + +public class Usuario { + private int id; + private String nombre,apellido,correo,contrasena; + + public Usuario() { + + } + + public Usuario(String nombre, String apellido, String correo, String contrasena) { + this.nombre = nombre; + this.apellido = apellido; + this.correo = correo; + this.contrasena = contrasena; + } + + public int getId() { + return id; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getApellido() { + return apellido; + } + + public void setApellido(String apellido) { + this.apellido = apellido; + } + + public String getCorreo() { + return correo; + } + + public void setCorreo(String correo) { + this.correo = correo; + } + + public String getContrasena() { + return contrasena; + } + + public void setContrasena(String contrasena) { + this.contrasena = contrasena; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/lenguaje/LenguajeDao.java b/src/main/java/com/roshka/proyectofinal/lenguaje/LenguajeDao.java new file mode 100644 index 0000000..f877529 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/lenguaje/LenguajeDao.java @@ -0,0 +1,26 @@ +package com.roshka.proyectofinal.lenguaje; + +import com.roshka.proyectofinal.DataBase; +import com.roshka.proyectofinal.entity.Lenguaje; + +import java.sql.Connection; +import java.sql.PreparedStatement; + +public class LenguajeDao { + + public static int save(Lenguaje l){ + int status=0; + try{ + Connection con= DataBase.getConnection(); + PreparedStatement ps=con.prepareStatement( + "insert into lenguaje (nombre_lenguaje) values (?)"); + ps.setString(1,l.getNombre_lenguaje()); + + status=ps.executeUpdate(); + + con.close(); + }catch(Exception ex){ex.printStackTrace();} + + return status; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/lenguaje/SaveServlet.java b/src/main/java/com/roshka/proyectofinal/lenguaje/SaveServlet.java new file mode 100644 index 0000000..cd1b4fe --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/lenguaje/SaveServlet.java @@ -0,0 +1,33 @@ +package com.roshka.proyectofinal.lenguaje; + +import com.roshka.proyectofinal.entity.Lenguaje; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; + +public class SaveServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + String nombre_lenguaje=request.getParameter("nombre_lenguaje"); + Lenguaje l =new Lenguaje(); + l.setNombre_lenguaje(nombre_lenguaje); + + int status=LenguajeDao.save(l); + if(status>0){ + out.print("

Record saved successfully!

"); + request.getRequestDispatcher("index.html").include(request, response); + }else{ + out.println("Sorry! unable to save record"); + } + + out.close(); + } + +} diff --git a/src/main/java/com/roshka/proyectofinal/login/LoginDao.java b/src/main/java/com/roshka/proyectofinal/login/LoginDao.java new file mode 100644 index 0000000..8ab20f8 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/login/LoginDao.java @@ -0,0 +1,33 @@ +package com.roshka.proyectofinal.login; + +import com.roshka.proyectofinal.DataBase; +import com.roshka.proyectofinal.entity.Lenguaje; +import com.roshka.proyectofinal.entity.LoginBean; + +import java.sql.Connection; +import java.sql.PreparedStatement; + +public class LoginDao { + + public boolean validate (LoginBean loginBean) { + int status = 0; + try { + Connection con = DataBase.getConnection(); + + PreparedStatement ps=con.prepareStatement( + "select * from usuarios where username=? and password = ?"); + ps.setString(1,loginBean.getUsername()); + ps.setString(2, loginBean.getPassword()); + status=ps.executeUpdate(); + + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } + + if (status > 0) return true ; + else return false ; + + } + +} diff --git a/src/main/java/com/roshka/proyectofinal/login/LoginServlet.java b/src/main/java/com/roshka/proyectofinal/login/LoginServlet.java new file mode 100644 index 0000000..c251007 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/login/LoginServlet.java @@ -0,0 +1,61 @@ +package com.roshka.proyectofinal.login; + + +import java.io.IOException; +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import com.roshka.proyectofinal.entity.LoginBean; + +/** + * Servlet implementation class LoginServlet + */ +@WebServlet("/login") +public class LoginServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public LoginServlet() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + response.getWriter().append("Served at: ").append(request.getContextPath()); + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + LoginDao loginDao = new LoginDao(); + + String username = request.getParameter("username"); + String password = request.getParameter("password"); + LoginBean loginBean = new LoginBean(); + loginBean.setUsername(username); + loginBean.setPassword(password); + + + if (loginDao.validate(loginBean)) + { + response.sendRedirect("loginSuccess.jsp"); + + } + else { + //HttpSession session = request.getSession(); + response.sendRedirect("login.jsp"); + + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/roshka/proyectofinal/profesor/ProfesorDao.java b/src/main/java/com/roshka/proyectofinal/profesor/ProfesorDao.java new file mode 100644 index 0000000..cdddabb --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/profesor/ProfesorDao.java @@ -0,0 +1,29 @@ +package com.roshka.proyectofinal.profesor; + +import com.roshka.proyectofinal.DataBase; +import com.roshka.proyectofinal.entity.Profesor; + +import java.sql.Connection; +import java.sql.PreparedStatement; + +public class ProfesorDao { + + public static int save(Profesor p){ + int status=0; + try{ + Connection con= DataBase.getConnection(); + PreparedStatement ps=con.prepareStatement( + "insert into profesor (nombre,apellido,nro_cedula,correo) values (?,?,?,?)"); + ps.setString(1,p.getNombre()); + ps.setString(2,p.getApellido()); + ps.setInt(3,p.getNro_cedula()); + ps.setString(4,p.getCorreo()); + + status=ps.executeUpdate(); + + con.close(); + }catch(Exception ex){ex.printStackTrace();} + + return status; + } +} diff --git a/src/main/java/com/roshka/proyectofinal/profesor/SaveServlet.java b/src/main/java/com/roshka/proyectofinal/profesor/SaveServlet.java new file mode 100644 index 0000000..526fbe4 --- /dev/null +++ b/src/main/java/com/roshka/proyectofinal/profesor/SaveServlet.java @@ -0,0 +1,36 @@ +package com.roshka.proyectofinal.profesor; + +import com.roshka.proyectofinal.entity.Profesor; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; + +public class SaveServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + String nombre=request.getParameter("nombre"); + String apellido=request.getParameter("apellido"); + String email=request.getParameter("correo"); + String nro_cedulaStr=request.getParameter("nro_cedula"); + int nro_cedula = Integer.parseInt(nro_cedulaStr); + Profesor p =new Profesor(nro_cedula, nombre, apellido, email); + + int status=ProfesorDao.save(p); + if(status>0){ + out.print("

Record saved successfully!

"); + request.getRequestDispatcher("index.html").include(request, response); + }else{ + out.println("Sorry! unable to save record"); + } + + out.close(); + } + +} diff --git a/src/main/webapp/Javascript.js b/src/main/webapp/Javascript.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/main/webapp/Javascript.js diff --git a/src/main/webapp/estilos/home.css b/src/main/webapp/estilos/home.css new file mode 100644 index 0000000..95ec9ca --- /dev/null +++ b/src/main/webapp/estilos/home.css @@ -0,0 +1,146 @@ +img.logoi{ + width: 200px; + +} + +img{ + width: 400px; + padding: 10px; + display: block; + padding:10px ; +} +.header { + margin-bottom: 0; + width: 700px; +} +a{ + float: right 100px; + color: #fff; + font-size: larger; + text-decoration: none; + padding: 10px; + +} + +body { + background: linear-gradient(100deg, rgba(20, 99, 155, 0.25), rgba(30, 148, 227, 0.25)); + background-image: url(webapp/imagenes/descarga.svg); + + background-size: contain; + background-attachment: fixed; + background-blend-mode: multiply; + font-family: Georgia, 'Times New Roman', Times, serif; + color: white; + position: relative; + width: 100px; + height: 100px; +} +/* ul{ + list-style: none; +} +.menu >ul{ + float: right; +} + +.menu li a { + + color:#fff; + text-decoration:none; + padding:10px 12px; + display:block; +} + +.menu li ul li { + marging-left + position:relative; +} */ +.menu { + width: 400%; + float: left; + + } + + .menu ul li { + float: right; + list-style-type: none; + text-align: right; + } + div.menu{ + float: right; + + + } + html, body { + margin:0; + padding:0; + height:100%; + } + + .menu ul li a { + padding-left: 5px; + + font-size: clamp(145px); + text-transform: uppercase; + display: block; + position: relative; + overflow: hidden; + padding-bottom: 50px; + white-space: nowrap; + } + .grafico,svg { + max-width: 50px; + display: block; + height: auto; +} +.seccion.hero { + margin-top: 10px; + padding-bottom: 10px; + width: 900px; +} +.hero { + perspective: 100px; +} +.hero { + display: grid; + grid-template-columns: auto repeat(5, 0.5fr) auto; +} +.hero { + display: flex; + flex-direction: column; + align-items: center; + padding-left: 200px; + /* padding-right: 200px; + */ +} +/* */ + .postulacion{ +border-radius: 30px; +} +.cta-main{ + width: 200px; + font-family: monospace; +background-color: yellow; +border: none; +} +/* Contenido pie de pagina */ +/* usamos media quiere para el responsive */ +/* @media (min-width: 768px) +.footer { + display: grid; + grid-template-rows: auto auto; + align-items: flex-start; + gap: 0; + padding: 80px 20px +} */ +.footer{ + margin-top: 10px; + padding-bottom: 10px; + height:100px; + width: 100px; + display: grid; +} + +.menu-footer a{ + text-decoration: none; + float: right; +} \ No newline at end of file diff --git a/src/main/webapp/formulario.html b/src/main/webapp/formulario.html new file mode 100644 index 0000000..1e45767 --- /dev/null +++ b/src/main/webapp/formulario.html @@ -0,0 +1,60 @@ + + + + + + + + + postulacion + + + +
+ + +
+

Si sigues interesado y cumples con los requisitos, completa el siguiente formulario:

+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + +
+ + +
+ + +
+ + +
+ + + +
+
+ +
+ + + \ No newline at end of file diff --git a/src/main/webapp/imagenes/descarga.svg b/src/main/webapp/imagenes/descarga.svg new file mode 100644 index 0000000..ee8c3f6 --- /dev/null +++ b/src/main/webapp/imagenes/descarga.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/webapp/imagenes/icon-email.svg b/src/main/webapp/imagenes/icon-email.svg new file mode 100644 index 0000000..74ce158 --- /dev/null +++ b/src/main/webapp/imagenes/icon-email.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main/webapp/imagenes/icon-location.ico b/src/main/webapp/imagenes/icon-location.ico new file mode 100644 index 0000000..b810fe9 Binary files /dev/null and b/src/main/webapp/imagenes/icon-location.ico differ diff --git a/src/main/webapp/imagenes/icon-location.svg b/src/main/webapp/imagenes/icon-location.svg new file mode 100644 index 0000000..32ec604 --- /dev/null +++ b/src/main/webapp/imagenes/icon-location.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/main/webapp/imagenes/icon-phone.svg b/src/main/webapp/imagenes/icon-phone.svg new file mode 100644 index 0000000..e2cf3c6 --- /dev/null +++ b/src/main/webapp/imagenes/icon-phone.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/imagenes/ilustracion-herov3.svg b/src/main/webapp/imagenes/ilustracion-herov3.svg new file mode 100644 index 0000000..e5d7772 --- /dev/null +++ b/src/main/webapp/imagenes/ilustracion-herov3.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/imagenes/logo-roshka.svg b/src/main/webapp/imagenes/logo-roshka.svg new file mode 100644 index 0000000..db74015 --- /dev/null +++ b/src/main/webapp/imagenes/logo-roshka.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/main/webapp/imagenes/logo_footer.svg b/src/main/webapp/imagenes/logo_footer.svg new file mode 100644 index 0000000..4fa8d55 --- /dev/null +++ b/src/main/webapp/imagenes/logo_footer.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/main/webapp/imagenes/roshkaicon.ico b/src/main/webapp/imagenes/roshkaicon.ico new file mode 100644 index 0000000..234d919 Binary files /dev/null and b/src/main/webapp/imagenes/roshkaicon.ico differ diff --git a/src/main/webapp/imagenes/social-fb.svg b/src/main/webapp/imagenes/social-fb.svg new file mode 100644 index 0000000..10c1fdf --- /dev/null +++ b/src/main/webapp/imagenes/social-fb.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main/webapp/imagenes/social-ig.svg b/src/main/webapp/imagenes/social-ig.svg new file mode 100644 index 0000000..99bee1c --- /dev/null +++ b/src/main/webapp/imagenes/social-ig.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/main/webapp/imagenes/social-linkedin.svg b/src/main/webapp/imagenes/social-linkedin.svg new file mode 100644 index 0000000..935f63b --- /dev/null +++ b/src/main/webapp/imagenes/social-linkedin.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/main/webapp/imagenes/social-twitter.svg b/src/main/webapp/imagenes/social-twitter.svg new file mode 100644 index 0000000..d7776de --- /dev/null +++ b/src/main/webapp/imagenes/social-twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html new file mode 100644 index 0000000..86aff9e --- /dev/null +++ b/src/main/webapp/index.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + Roshka WebSite + +
+ + + +
+ + + +
+
+ + + + + + +






+
+
+

Es tu turno Postulate para el bootcamp

+

Aprende

+
+
+
+

Es un campo de entrenamiento intensivo y gratuito para principiantes que ya programan y quieren ser parte de la empresa

+
+
+ + +
+
+ +
+ +
+ + + +
+ + +
+ + + + + + + diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index dd88878..bff22f6 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,13 +1,18 @@ <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> - - - - JSP - Hello World - - -

<%= "Hello World!" %> -

-
-Hello Servlet - - \ No newline at end of file + + + + + JSP - Hello World + + + +

+ <%= "Hello World!" %> +

+
+ Hello Servlet
+ Postulate aqui + + + \ No newline at end of file diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp new file mode 100644 index 0000000..1f1dadf --- /dev/null +++ b/src/main/webapp/login.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> + + + + BootcampsLogin + + +
+

User Login Form

+
+ + + + + +
User Name:
Password:
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/loginSuccess.jsp b/src/main/webapp/loginSuccess.jsp new file mode 100644 index 0000000..2d4e892 --- /dev/null +++ b/src/main/webapp/loginSuccess.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> + + + + +LoginExitoso + + + +
+

LOGGIN EXITOSO

+ + +
+ + \ No newline at end of file