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
cb95be3a
Commit
cb95be3a
authored
May 12, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cambios en el formulario,saveservlet,agregado formulario en index,creado javascript
parent
202fcdd6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
17 deletions
+35
-17
src/main/java/Postulante/SaveServlet.java
+7
-3
src/main/webapp/Javascript.js
+0
-0
src/main/webapp/formulario.html
+11
-2
src/main/webapp/index.jsp
+17
-12
No files found.
src/main/java/Postulante/SaveServlet.java
View file @
cb95be3a
package
Postulante
;
import
com.roshka.proyectofinal.Postulante
;
import
com.roshka.proyectofinal.entity.Bootcamp
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.annotation.WebServlet
;
import
jakarta.servlet.http.HttpServletRequest
;
...
...
@@ -8,7 +9,7 @@ import java.io.IOException;
import
java.io.PrintWriter
;
@WebServlet
(
"/SaveServlet"
)
@WebServlet
(
"
../java/Postulante
/SaveServlet"
)
public
class
SaveServlet
{
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
...
...
@@ -24,6 +25,7 @@ public class SaveServlet {
boolean
experienciaProgramando
=
false
;
boolean
experienciaLaboral
=
false
;
boolean
universidad
=
false
;
boolean
notebook
=
false
;
if
(
request
.
getParameter
(
"experiencia_laboral"
)
!=
null
){
experienciaLaboral
=
true
;
}
...
...
@@ -31,13 +33,13 @@ public class SaveServlet {
experienciaProgramando
=
true
;
}
if
(
request
.
getParameter
(
"notebook"
)
!=
null
){
boolean
notebook
=
true
;
notebook
=
true
;
}
if
(
request
.
getParameter
(
"universidad"
)
!=
null
){
universidad
=
true
;
}
Bootcamp
bootcamp
=
new
Bootcamp
();
Postulante
postulante
=
new
Postulante
();
postulante
.
setNombre
(
nombre
);
postulante
.
setApellido
(
apellido
);
...
...
@@ -47,6 +49,8 @@ public class SaveServlet {
postulante
.
setDireccion
(
direccion
);
postulante
.
setExpLaboral
(
experienciaLaboral
);
postulante
.
setEstudioUniversitario
(
universidad
);
postulante
.
setNotebook
(
notebook
);
postulante
.
setBootcampId
(
1
);
int
status
=
PostulanteDao
.
save
(
postulante
);
...
...
src/main/webapp/Javascript.js
0 → 100644
View file @
cb95be3a
src/main/webapp/formulario.html
View file @
cb95be3a
...
...
@@ -16,7 +16,7 @@
<div>
<p>
Si sigues interesado y cumples con los requisitos, completa el siguiente formulario:
</p>
<form
action=
"
"
>
<form
method=
"post"
action=
"../java/Postulante/SaveServlet.java
"
>
<label
for=
"nombre"
>
Ingrese su Nombre:
</label>
<input
required
id=
"nombre"
type=
"text"
><br>
...
...
@@ -40,9 +40,18 @@
<!-- Si no lo marca el valor que envia es null y si lo marca es "ON" -->
<input
id=
"experiencia_laboral"
type=
"checkbox"
><br>
<label
for=
"experiencia_programando"
>
Tienes experiencia programando
</label>
<label
for=
"experiencia_programando"
>
Que lenguajes de programacion conoces:
</label>
<input
id=
"experiencia_programando"
type=
"checkbox"
><br>
<label
for=
"notebook"
>
Cuenta con notebook:
</label>
<input
id=
"notebook"
type=
"checkbox"
><br>
...
...
src/main/webapp/index.jsp
View file @
cb95be3a
<
%@
page
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<!DOCTYPE html>
<html>
<head>
<title>
JSP - Hello World
</title>
</head>
<body>
<h1><
%=
"
Hello
World
!"
%
>
</h1>
<br/>
<a
href=
"hello-servlet"
>
Hello Servlet
</a>
</body>
</html>
\ No newline at end of file
</head>
<body>
<h1>
<
%=
"
Hello
World
!"
%
>
</h1>
<br/>
<a
href=
"hello-servlet"
>
Hello Servlet
</a><br>
<a
href=
"./formulario.html"
>
Postulate aqui
</a>
</body>
</html>
\ No newline at end of file
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