diff --git a/src/main/java/com/roshka/proyectofinal/Postulante/PostulanteDao.java b/src/main/java/com/roshka/proyectofinal/Postulante/PostulanteDao.java index e6852cd..055fcce 100644 --- a/src/main/java/com/roshka/proyectofinal/Postulante/PostulanteDao.java +++ b/src/main/java/com/roshka/proyectofinal/Postulante/PostulanteDao.java @@ -1,270 +1,254 @@ package com.roshka.proyectofinal.Postulante; import com.roshka.proyectofinal.DataBase; import com.roshka.proyectofinal.entity.Postulante; -import jakarta.servlet.http.HttpServlet; -import javafx.geometry.Pos; - -import javax.xml.crypto.Data; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; -<<<<<<< HEAD -import java.util.ArrayList; -import java.util.List; - -public class PostulanteDao extends HttpServlet { -======= import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -public class PostulanteDao { - List postulante = null; ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 - - public static int save(Postulante postulante){ - int status=0; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement( - "insert into postulante(nombre,apellido,nro_cedula,correo,telefono,direccion,experiencia_laboral,estudio_universitario,notebook,bootcamp_id,aceptado) values (?,?,?,?,?,?,?,?,?,?,?)"); - ps.setString(1,postulante.getNombre()); - ps.setString(2,postulante.getApellido()); - ps.setInt(3,postulante.getNro_cedula()); - ps.setString(4,postulante.getCorreo()); - ps.setString(5,postulante.getTelefono()); - ps.setString(6,postulante.getDireccion()); - ps.setBoolean(7,postulante.getExpLaboral()); - ps.setBoolean(8,postulante.getEstudioUniversitario()); - ps.setBoolean(9,postulante.getNotebook()); - ps.setInt(10,postulante.getBootcampId()); - ps.setBoolean(11,postulante.getAceptado()); - status=ps.executeUpdate(); - con.close(); - }catch(Exception ex){ex.printStackTrace();} - - return status; - } - -<<<<<<< HEAD - - - -======= - public static List listarPostulante(){ - List postulante = new ArrayList<>(); - String sql = "select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, a.telefono, a.direccion, " + - "a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, c.nombre_lenguaje as bootcamp, \n" + - "a.aceptado from postulante a\n" + - " inner join bootcamp b on b.id= a.bootcamp_id\n" + - " inner join lenguaje c on c.id=b.id_lenguaje\n" + - " order by a.id;"; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement(sql); - ResultSet rs = ps.executeQuery(); - while(rs.next()){ - Postulante postulanteObject = new Postulante(); - postulanteObject.setId(rs.getInt("id")); - postulanteObject.setNombre(rs.getString("nombre")); - postulanteObject.setApellido(rs.getString("apellido")); - postulanteObject.setNroCedula(rs.getInt("nro_cedula")); - postulanteObject.setCorreo(rs.getString("correo")); - postulanteObject.setTelefono(rs.getString("telefono")); - postulanteObject.setDireccion(rs.getString("direccion")); - postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); - postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); - postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); - postulanteObject.setNotebook(rs.getBoolean("notebook")); - postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); - postulanteObject.setAceptado(rs.getBoolean("aceptado")); - postulante.add(postulanteObject); + public class PostulanteDao { + public static int save(Postulante postulante) { + int status = 0; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement( + "insert into postulante(nombre,apellido,nro_cedula,correo,telefono,direccion,experiencia_laboral,estudio_universitario,notebook,bootcamp_id,aceptado) values (?,?,?,?,?,?,?,?,?,?,?)"); + ps.setString(1, postulante.getNombre()); + ps.setString(2, postulante.getApellido()); + ps.setInt(3, postulante.getNro_cedula()); + ps.setString(4, postulante.getCorreo()); + ps.setString(5, postulante.getTelefono()); + ps.setString(6, postulante.getDireccion()); + ps.setBoolean(7, postulante.getExpLaboral()); + ps.setBoolean(8, postulante.getEstudioUniversitario()); + ps.setBoolean(9, postulante.getNotebook()); + ps.setInt(10, postulante.getBootcampId()); + ps.setBoolean(11, postulante.getAceptado()); + status = ps.executeUpdate(); + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); } - con.close(); - } catch (SQLException e) { - throw new RuntimeException(e); + return status; } - return postulante; - } - - public static void update(int id, Boolean valor){ - if(valor==true){ - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("update postulante set aceptado= false\n" + - "where id=?"); - ps.setInt(1,id); - ps.executeUpdate(); - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); - } - }else { - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("update postulante set aceptado= true\n" + - "where id=?"); - ps.setInt(1,id); - ps.executeUpdate(); - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); - } - } - - } - public static List buscarPorNombre(String nombre){ - List postulante = null; - Postulante postulanteObject = null; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + - "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + - "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + + public static List listarPostulante() { + List postulante = new ArrayList<>(); + String sql = "select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, a.telefono, a.direccion, " + + "a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, c.nombre_lenguaje as bootcamp, \n" + + "a.aceptado from postulante a\n" + " inner join bootcamp b on b.id= a.bootcamp_id\n" + " inner join lenguaje c on c.id=b.id_lenguaje\n" + - " where a.nombre ilike ? "); - ps.setString(1, "%" + nombre + "%"); - System.out.println(nombre); - ResultSet rs = ps.executeQuery(); - postulante = new ArrayList<>(); - postulanteObject= new Postulante(); - while(rs.next()){ + " order by a.id;"; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + Postulante postulanteObject = new Postulante(); + postulanteObject.setId(rs.getInt("id")); + postulanteObject.setNombre(rs.getString("nombre")); + postulanteObject.setApellido(rs.getString("apellido")); + postulanteObject.setNroCedula(rs.getInt("nro_cedula")); + postulanteObject.setCorreo(rs.getString("correo")); + postulanteObject.setTelefono(rs.getString("telefono")); + postulanteObject.setDireccion(rs.getString("direccion")); + postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); + postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); + postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); + postulanteObject.setNotebook(rs.getBoolean("notebook")); + postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); + postulanteObject.setAceptado(rs.getBoolean("aceptado")); + postulante.add(postulanteObject); + } + + con.close(); + } catch (SQLException e) { + throw new RuntimeException(e); + } + return postulante; + } - postulanteObject.setId(rs.getInt("id")); - postulanteObject.setNombre(rs.getString("nombre")); - postulanteObject.setApellido(rs.getString("apellido")); - postulanteObject.setNroCedula(rs.getInt("nro_cedula")); - postulanteObject.setCorreo(rs.getString("correo")); - postulanteObject.setTelefono(rs.getString("telefono")); - postulanteObject.setDireccion(rs.getString("direccion")); - postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); - postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); - postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); - postulanteObject.setNotebook(rs.getBoolean("notebook")); - postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); - postulanteObject.setAceptado(rs.getBoolean("aceptado")); - postulante.add(postulanteObject); + public static void update(int id, Boolean valor) { + if (valor == true) { + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("update postulante set aceptado= false\n" + + "where id=?"); + ps.setInt(1, id); + ps.executeUpdate(); + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } else { + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("update postulante set aceptado= true\n" + + "where id=?"); + ps.setInt(1, id); + ps.executeUpdate(); + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } } - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); + } - return postulante; - } - public static List listarPostulanteAceptados(){ - List postulante = null; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + - "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + - "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + - " inner join bootcamp b on b.id= a.bootcamp_id\n" + - " inner join lenguaje c on c.id=b.id_lenguaje\n" + - " where a.aceptado= true "); - ResultSet rs = ps.executeQuery(); - postulante = new ArrayList<>(); - Postulante postulanteObject= new Postulante(); - while(rs.next()){ - postulanteObject.setId(rs.getInt("id")); - postulanteObject.setNombre(rs.getString("nombre")); - postulanteObject.setApellido(rs.getString("apellido")); - postulanteObject.setNroCedula(rs.getInt("nro_cedula")); - postulanteObject.setCorreo(rs.getString("correo")); - postulanteObject.setTelefono(rs.getString("telefono")); - postulanteObject.setDireccion(rs.getString("direccion")); - postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); - postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); - postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); - postulanteObject.setNotebook(rs.getBoolean("notebook")); - postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); - postulanteObject.setAceptado(rs.getBoolean("aceptado")); - postulante.add(postulanteObject); + public static List buscarPorNombre(String nombre) { + List postulante = null; + Postulante postulanteObject = null; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + + "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + + "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + + " inner join bootcamp b on b.id= a.bootcamp_id\n" + + " inner join lenguaje c on c.id=b.id_lenguaje\n" + + " where a.nombre ilike ? "); + ps.setString(1, "%" + nombre + "%"); + System.out.println(nombre); + ResultSet rs = ps.executeQuery(); + postulante = new ArrayList<>(); + postulanteObject = new Postulante(); + while (rs.next()) { + + postulanteObject.setId(rs.getInt("id")); + postulanteObject.setNombre(rs.getString("nombre")); + postulanteObject.setApellido(rs.getString("apellido")); + postulanteObject.setNroCedula(rs.getInt("nro_cedula")); + postulanteObject.setCorreo(rs.getString("correo")); + postulanteObject.setTelefono(rs.getString("telefono")); + postulanteObject.setDireccion(rs.getString("direccion")); + postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); + postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); + postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); + postulanteObject.setNotebook(rs.getBoolean("notebook")); + postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); + postulanteObject.setAceptado(rs.getBoolean("aceptado")); + postulante.add(postulanteObject); + } + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); } - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); + return postulante; } - return postulante; - } - public static List listarPorBootcamp(String nombre){ - List postulante = null; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, a.telefono, a.direccion, \n" + - " a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, c.nombre_lenguaje as bootcamp, \n" + - " a.aceptado from postulante a\n" + - " inner join bootcamp b on b.id= a.bootcamp_id\n" + - " inner join lenguaje c on c.id=b.id_lenguaje\n" + - " where c.nombre_lenguaje ilike ? "); - ps.setString(1, "%" + nombre + "%"); - ResultSet rs = ps.executeQuery(); - postulante = new ArrayList<>(); - Postulante postulanteObject= new Postulante(); - while(rs.next()){ - postulanteObject.setId(rs.getInt("id")); - postulanteObject.setNombre(rs.getString("nombre")); - postulanteObject.setApellido(rs.getString("apellido")); - postulanteObject.setNroCedula(rs.getInt("nro_cedula")); - postulanteObject.setCorreo(rs.getString("correo")); - postulanteObject.setTelefono(rs.getString("telefono")); - postulanteObject.setDireccion(rs.getString("direccion")); - postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); - postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); - postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); - postulanteObject.setNotebook(rs.getBoolean("notebook")); - postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); - postulanteObject.setAceptado(rs.getBoolean("aceptado")); - postulante.add(postulanteObject); + public static List listarPostulanteAceptados() { + List postulante = null; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + + "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + + "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + + " inner join bootcamp b on b.id= a.bootcamp_id\n" + + " inner join lenguaje c on c.id=b.id_lenguaje\n" + + " where a.aceptado= true "); + ResultSet rs = ps.executeQuery(); + postulante = new ArrayList<>(); + Postulante postulanteObject = new Postulante(); + while (rs.next()) { + postulanteObject.setId(rs.getInt("id")); + postulanteObject.setNombre(rs.getString("nombre")); + postulanteObject.setApellido(rs.getString("apellido")); + postulanteObject.setNroCedula(rs.getInt("nro_cedula")); + postulanteObject.setCorreo(rs.getString("correo")); + postulanteObject.setTelefono(rs.getString("telefono")); + postulanteObject.setDireccion(rs.getString("direccion")); + postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); + postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); + postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); + postulanteObject.setNotebook(rs.getBoolean("notebook")); + postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); + postulanteObject.setAceptado(rs.getBoolean("aceptado")); + postulante.add(postulanteObject); + } + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); } - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); + return postulante; } - return postulante; - } - public static List buscarPorNoteBook(){ - List postulante = null; - Postulante postulanteObject = null; - try{ - Connection con= DataBase.getConnection(); - PreparedStatement ps=con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + - "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + - "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + - " inner join bootcamp b on b.id= a.bootcamp_id\n" + - " inner join lenguaje c on c.id=b.id_lenguaje\n" + - " where a.notebook=true "); - ResultSet rs = ps.executeQuery(); - postulante = new ArrayList<>(); - postulanteObject= new Postulante(); - while(rs.next()){ + public static List listarPorBootcamp(String nombre) { + List postulante = null; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, a.telefono, a.direccion, \n" + + " a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, c.nombre_lenguaje as bootcamp, \n" + + " a.aceptado from postulante a\n" + + " inner join bootcamp b on b.id= a.bootcamp_id\n" + + " inner join lenguaje c on c.id=b.id_lenguaje\n" + + " where c.nombre_lenguaje ilike ? "); + ps.setString(1, "%" + nombre + "%"); + ResultSet rs = ps.executeQuery(); + postulante = new ArrayList<>(); + Postulante postulanteObject = new Postulante(); + while (rs.next()) { + postulanteObject.setId(rs.getInt("id")); + postulanteObject.setNombre(rs.getString("nombre")); + postulanteObject.setApellido(rs.getString("apellido")); + postulanteObject.setNroCedula(rs.getInt("nro_cedula")); + postulanteObject.setCorreo(rs.getString("correo")); + postulanteObject.setTelefono(rs.getString("telefono")); + postulanteObject.setDireccion(rs.getString("direccion")); + postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); + postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); + postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); + postulanteObject.setNotebook(rs.getBoolean("notebook")); + postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); + postulanteObject.setAceptado(rs.getBoolean("aceptado")); + postulante.add(postulanteObject); + } + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } + return postulante; + } - postulanteObject.setId(rs.getInt("id")); - postulanteObject.setNombre(rs.getString("nombre")); - postulanteObject.setApellido(rs.getString("apellido")); - postulanteObject.setNroCedula(rs.getInt("nro_cedula")); - postulanteObject.setCorreo(rs.getString("correo")); - postulanteObject.setTelefono(rs.getString("telefono")); - postulanteObject.setDireccion(rs.getString("direccion")); - postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); - postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); - postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); - postulanteObject.setNotebook(rs.getBoolean("notebook")); - postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); - postulanteObject.setAceptado(rs.getBoolean("aceptado")); - postulante.add(postulanteObject); + public static List buscarPorNoteBook() { + List postulante = null; + Postulante postulanteObject = null; + try { + Connection con = DataBase.getConnection(); + PreparedStatement ps = con.prepareStatement("select a.id, a.nombre, a.apellido, a.nro_cedula, a.correo, " + + "a.telefono, a.direccion, a.experiencia_laboral, a.estudio_universitario, a.bootcamp_id, a.notebook, " + + "c.nombre_lenguaje as bootcamp, \n" + "a.aceptado from postulante a\n" + + " inner join bootcamp b on b.id= a.bootcamp_id\n" + + " inner join lenguaje c on c.id=b.id_lenguaje\n" + + " where a.notebook=true "); + ResultSet rs = ps.executeQuery(); + postulante = new ArrayList<>(); + postulanteObject = new Postulante(); + while (rs.next()) { + + postulanteObject.setId(rs.getInt("id")); + postulanteObject.setNombre(rs.getString("nombre")); + postulanteObject.setApellido(rs.getString("apellido")); + postulanteObject.setNroCedula(rs.getInt("nro_cedula")); + postulanteObject.setCorreo(rs.getString("correo")); + postulanteObject.setTelefono(rs.getString("telefono")); + postulanteObject.setDireccion(rs.getString("direccion")); + postulanteObject.setExpLaboral(rs.getBoolean("experiencia_laboral")); + postulanteObject.setEstudioUniversitario(rs.getBoolean("estudio_universitario")); + postulanteObject.setBootcampId(rs.getInt("bootcamp_id")); + postulanteObject.setNotebook(rs.getBoolean("notebook")); + postulanteObject.setNombreBootcamp(rs.getString("bootcamp")); + postulanteObject.setAceptado(rs.getBoolean("aceptado")); + postulante.add(postulanteObject); + } + con.close(); + } catch (Exception ex) { + ex.printStackTrace(); } - con.close(); - }catch(Exception ex){ - ex.printStackTrace(); + return postulante; } - return postulante; } ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 -} + diff --git a/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java b/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java index dc669fc..3b668e0 100644 --- a/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java +++ b/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java @@ -69,7 +69,7 @@ public class SaveServlet extends HttpServlet { if (request.getParameter("universidad") != null){ universidad = true; } - Bootcamp bootcamp = new Bootcamp(); + Postulante postulante=new Postulante(); PostulanteLenguaje cargarLenguaje = new PostulanteLenguaje(); int status = 0; @@ -105,51 +105,30 @@ public class SaveServlet extends HttpServlet { } } } -<<<<<<< HEAD - if(status >0 && statusLenguaje > 0){ - //out.println(""); - out.print("

Record saved successfully!

"); - request.getRequestDispatcher("formulario.jsp").include(request, response); - }else{ - if (rechazarDatos){ - if (contador == 0){ - out.println("Debe seleccionar al menos una opcion de lenguaje que conoce para postularse"); - out.println("Volver al cuestionario"); - }else { - out.println("

El correo ingresado ya esta registrado para el bootcamp actual

"); - - } - }else{ - out.println("Error"); + if(status>0){ + //out.print("

Record saved successfully!

"); + out.print("
\n" + + " × \n" + + " Formulario Cargado! EXITOSAMENTE CARGADO\n" + + "
"); + request.getRequestDispatcher("formulario.jsp").include(request, response); + }else{ + if (rechazarDatos){ -======= - int status=PostulanteDao.save(postulante); - if(status>0){ - //out.print("

Record saved successfully!

"); - out.print("
\n" + + out.print("
\n" + " × \n" + - " Formulario Cargado! EXITOSAMENTE CARGADO\n" + + " Formulario ya Cargado! YA EXISTE EL FORMULARIO\n" + + "
"); + request.getRequestDispatcher("formulario.jsp").include(request, response); + }else { + out.println("Error al cargar datos"); + out.print("
\n" + + " × \n" + + " Formulario ya Cargado! YA EXISTE EL FORMULARIO\n" + "
"); request.getRequestDispatcher("formulario.jsp").include(request, response); - }else{ - if (rechazarDatos){ - //out.println("El correo ingresado ya esta registrado para el bootcamp actual"); - out.print("
\n" + - " × \n" + - " Formulario ya Cargado! YA EXISTE EL FORMULARIO\n" + - "
"); - request.getRequestDispatcher("formulario.jsp").include(request, response); - }else { - out.println("Error al cargar datos"); - out.print("
\n" + - " × \n" + - " Formulario ya Cargado! YA EXISTE EL FORMULARIO\n" + - "
"); - request.getRequestDispatcher("formulario.jsp").include(request, response); ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 - } } - + } }catch (Exception ex){ ex.printStackTrace(); } diff --git a/src/main/java/com/roshka/proyectofinal/entity/Postulante.java b/src/main/java/com/roshka/proyectofinal/entity/Postulante.java index 6add46c..8e23268 100644 --- a/src/main/java/com/roshka/proyectofinal/entity/Postulante.java +++ b/src/main/java/com/roshka/proyectofinal/entity/Postulante.java @@ -48,10 +48,6 @@ public class Postulante { return id; } - public void setId(int id) { - this.id = id; - } - public int getNro_cedula() { return nroCedula; } @@ -123,35 +119,13 @@ public class Postulante { this.id = id; } - public int getNroCedula() { - return nroCedula; - } - public void setNroCedula(int nroCedula) { this.nroCedula = nroCedula; } - public String getNombreBootcamp() { - return nombreBootcamp; - } - public void setNombreBootcamp(String nombreBootcamp) { this.nombreBootcamp = nombreBootcamp; } - public boolean isExpLaboral() { - return expLaboral; - } - public boolean isEstudioUniversitario() { - return estudioUniversitario; - } - - public boolean isNotebook() { - return notebook; - } - - public boolean isAceptado() { - return aceptado; - } } diff --git a/src/main/webapp/formulario.jsp b/src/main/webapp/formulario.jsp index a7e64d8..d9c0e19 100644 --- a/src/main/webapp/formulario.jsp +++ b/src/main/webapp/formulario.jsp @@ -2,20 +2,8 @@ pageEncoding="UTF-8"%> <%@ page import="java.sql.*,java.sql.Connection,java.sql.ResultSet,com.roshka.proyectofinal.DataBase,jakarta.servlet.http.HttpServlet,jakarta.servlet.http.HttpServletRequest"%> -<<<<<<< HEAD -======= - - - - - - - - Formulario Postulante - ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 @@ -29,32 +17,7 @@ pageEncoding="UTF-8"%> Formulario Postulante -<<<<<<< HEAD -======= -
- - -
- - -
- - -
- - -
- - -
- - -
- - - <%@ page import="com.roshka.proyectofinal.entity.Lenguaje, com.roshka.proyectofinal.lenguaje.LenguajeDao, java.util.List,java.util.Iterator" %> ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765
@@ -72,14 +35,6 @@ pageEncoding="UTF-8"%> ResultSet rs = stmt.executeQuery("SELECT * FROM bootcamp WHERE id= "+id+ " LIMIT 1" ); rs.next(); %> -<<<<<<< HEAD -======= -
  • - id= - <%=len.getNombre_lenguaje() %> name= - <%=len.getNombre_lenguaje() %> type="checkbox">
    -
  • ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765

    Descripcion:

    @@ -87,39 +42,11 @@ pageEncoding="UTF-8"%>

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

    -<<<<<<< HEAD -======= - -
  • - -
  • - -
    -

    Lenguajes de programacion que conoces:

    - - -
    - - -
    - - -
    - - -
    - volver - - - - ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 "> -<<<<<<< HEAD
    @@ -219,7 +146,4 @@ pageEncoding="UTF-8"%> } init(); })(); - -======= - ->>>>>>> 9f750c7a848792df924b81bbb2c48da70f9d8765 + \ No newline at end of file