Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ProyectoFinal-Bootcamp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Baez
ProyectoFinal-Bootcamp
Commits
799fa838
Commit
799fa838
authored
May 16, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coexion entre paginas y validacion de carga de postulantes
parent
bd9b5ea9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
118 deletions
+8
-118
src/main/java/com/roshka/proyectofinal/Postulante/EditServletPostulante.java
+0
-49
src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java
+3
-3
src/main/java/com/roshka/proyectofinal/Postulante/ViewServletPostulantes.java
+0
-60
src/main/webapp/bootcamp.jsp
+0
-0
src/main/webapp/formulario.jsp
+0
-0
src/main/webapp/index.html
+1
-1
src/main/webapp/manage_postulantes.jsp
+4
-5
No files found.
src/main/java/com/roshka/proyectofinal/Postulante/EditServletPostulante.java
deleted
100644 → 0
View file @
bd9b5ea9
package
com
.
roshka
.
proyectofinal
.
Postulante
;
import
com.roshka.proyectofinal.DataBase
;
import
com.roshka.proyectofinal.entity.Postulante
;
import
com.roshka.proyectofinal.entity.Bootcamp
;
import
com.roshka.proyectofinal.entity.PostulanteLenguaje
;
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
javafx.geometry.Pos
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.sql.*
;
import
java.util.List
;
@WebServlet
(
"/EditServletPostulante"
)
public
class
EditServletPostulante
extends
HttpServlet
{
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
setContentType
(
"text/html"
);
PrintWriter
out
=
response
.
getWriter
();
String
sid
=
request
.
getParameter
(
"id"
);
boolean
accion
;
if
(
request
.
getParameter
(
"value"
)
==
"Rechazar"
)
{
accion
=
false
;
}
else
{
accion
=
true
;
}
int
id
=
Integer
.
parseInt
(
sid
);
Postulante
e
=
new
Postulante
();
e
.
setId
(
id
);
e
.
setAceptado
(
accion
);
int
status
=
PostulanteDao
.
update
(
e
);
if
(
status
>
0
)
{
response
.
sendRedirect
(
"ViewServlet"
);
}
else
{
out
.
println
(
"Sorry! unable to update record"
);
}
out
.
close
();
}
}
src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java
View file @
799fa838
...
@@ -24,7 +24,7 @@ public class SaveServlet extends HttpServlet {
...
@@ -24,7 +24,7 @@ public class SaveServlet extends HttpServlet {
response
.
setContentType
(
"text/html"
);
response
.
setContentType
(
"text/html"
);
PrintWriter
out
=
response
.
getWriter
();
PrintWriter
out
=
response
.
getWriter
();
boolean
rechazarDatos
=
false
;
boolean
rechazarDatos
=
false
;
int
bootcampActual
=
2
;
int
bootcampActual
=
Integer
.
parseInt
(
request
.
getParameter
(
"bootcamp_id"
))
;
try
{
try
{
Connection
con
=
DataBase
.
getConnection
();
Connection
con
=
DataBase
.
getConnection
();
...
@@ -116,11 +116,11 @@ public class SaveServlet extends HttpServlet {
...
@@ -116,11 +116,11 @@ public class SaveServlet extends HttpServlet {
out
.
println
(
"<a href=formulario.jsp >Volver al cuestionario</a>"
);
out
.
println
(
"<a href=formulario.jsp >Volver al cuestionario</a>"
);
}
else
{
}
else
{
out
.
println
(
"<p>El correo ingresado ya esta registrado para el bootcamp actual<p>"
);
out
.
println
(
"<p>El correo ingresado ya esta registrado para el bootcamp actual<p>"
);
request
.
getRequestDispatcher
(
""
).
include
(
request
,
response
);
//
request.getRequestDispatcher("").include(request, response);
}
}
}
else
{
}
else
{
out
.
println
(
"Error"
);
out
.
println
(
"Error"
);
out
.
println
(
"<script> window.alert('Falla al enviar la postulacion,Intente de nuevo') </script>"
);
//
out.println("<script> window.alert('Falla al enviar la postulacion,Intente de nuevo') </script>");
}
}
}
}
...
...
src/main/java/com/roshka/proyectofinal/Postulante/ViewServletPostulantes.java
deleted
100644 → 0
View file @
bd9b5ea9
package
com
.
roshka
.
proyectofinal
.
Postulante
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
com.roshka.proyectofinal.DataBase
;
import
com.roshka.proyectofinal.entity.Postulante
;
import
com.roshka.proyectofinal.entity.Bootcamp
;
import
com.roshka.proyectofinal.entity.PostulanteLenguaje
;
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
javafx.geometry.Pos
;
import
com.roshka.proyectofinal.DataBase
;
import
com.roshka.proyectofinal.entity.Postulante
;
import
com.roshka.proyectofinal.entity.Bootcamp
;
import
com.roshka.proyectofinal.entity.PostulanteLenguaje
;
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
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.Statement
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.sql.*
;
import
java.util.List
;
@WebServlet
(
"/ViewServletPostulante"
)
public
class
ViewServletPostulantes
extends
HttpServlet
{
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
setContentType
(
"text/html"
);
PrintWriter
out
=
response
.
getWriter
();
out
.
println
(
"<h1>Lista de Postulantes</h1>"
);
List
<
Postulante
>
list
=
PostulanteDao
.
ListarPostulantes
();
out
.
print
(
"<table border='1' width='100%'"
);
out
.
print
(
"<tr><th>Id</th><th>Nombre</th><th>Apellido</th><th>Email</th><th>Direccion</th> <th>Edit</th><th>Delete</th></tr>"
);
for
(
Postulante
e:
list
){
out
.
print
(
"<tr><td>"
+
e
.
getId
()+
"</td><td>"
+
e
.
getNombre
()+
"</td><td>"
+
e
.
getApellido
()+
"</td> <td>"
+
e
.
getCorreo
()+
"</td><td>"
+
e
.
getDireccion
()+
"</td><td><a href='EditServlet?id="
+
e
.
getId
()+
"'>edit</a></td> <td><a href='DeleteServlet?id="
+
e
.
getId
()+
"'>delete</a></td></tr>"
);
}
out
.
print
(
"</table>"
);
out
.
close
();
}
}
src/main/webapp/bootcamp.
html
→
src/main/webapp/bootcamp.
jsp
View file @
799fa838
This diff is collapsed.
Click to expand it.
src/main/webapp/formulario.jsp
View file @
799fa838
This diff is collapsed.
Click to expand it.
src/main/webapp/index.html
View file @
799fa838
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<div
class=
"menu"
>
<div
class=
"menu"
>
<ul>
<ul>
<li
class=
"link-menu"
><a
href=
""
>
Home
</a></li>
<li
class=
"link-menu"
><a
href=
""
>
Home
</a></li>
<li
class=
"link-menu"
><a
href=
"
formulario
.jsp"
>
Postulate
</a></li>
<li
class=
"link-menu"
><a
href=
"
bootcamp
.jsp"
>
Postulate
</a></li>
<li
class=
"link-menu"
><a
href=
"formulario_bootcamp.jsp"
>
Crear bootcamp
</a></li>
<li
class=
"link-menu"
><a
href=
"formulario_bootcamp.jsp"
>
Crear bootcamp
</a></li>
<li
class=
"link-menu"
><a
href=
"manage_postulantes.jsp"
>
Manage Postulantes(perdon angel)
</a></li>
<li
class=
"link-menu"
><a
href=
"manage_postulantes.jsp"
>
Manage Postulantes(perdon angel)
</a></li>
</ul>
</ul>
...
...
src/main/webapp/manage_postulantes.jsp
View file @
799fa838
...
@@ -82,9 +82,8 @@ pageEncoding="UTF-8"%>
...
@@ -82,9 +82,8 @@ pageEncoding="UTF-8"%>
</td>
</td>
<td>
<td>
<form
method=
"post"
action=
"EditServletPostulante"
>
<form
method=
"post"
action=
"EditServletPostulante"
>
<input
type=
"hidden"
value=
<%
%
>
id=
<input
type=
"hidden"
value=
"<%=rs.getInt('id') %>"
>
<
%=
rs
.
getInt
(
"
id
")
%
>
>
<
%
<
%
String
accion =
""
;
String
accion =
""
;
if
(
rs
.
getBoolean
("
aceptado
")){
if
(
rs
.
getBoolean
("
aceptado
")){
accion=
"Rechazar"
;
accion=
"Rechazar"
;
...
@@ -92,8 +91,8 @@ pageEncoding="UTF-8"%>
...
@@ -92,8 +91,8 @@ pageEncoding="UTF-8"%>
accion=
"Aceptar"
;
accion=
"Aceptar"
;
}
}
%
>
%
>
<input
type=
"submit
"
value=
<%=accion
%
>
<input
type=
"submit"
name=
"
"
value=
<%=accion
%
>
<a
href=
""
></a>
<a
href=
""
></a>
</form>
</form>
</td>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment