Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
misuperproyecto
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
Nahuel Mereles Rodriguez
misuperproyecto
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
;
package
Postulante
;
import
com.roshka.proyectofinal.Postulante
;
import
com.roshka.proyectofinal.Postulante
;
import
com.roshka.proyectofinal.entity.Bootcamp
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.annotation.WebServlet
;
import
jakarta.servlet.annotation.WebServlet
;
import
jakarta.servlet.http.HttpServletRequest
;
import
jakarta.servlet.http.HttpServletRequest
;
...
@@ -8,7 +9,7 @@ import java.io.IOException;
...
@@ -8,7 +9,7 @@ import java.io.IOException;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
@WebServlet
(
"/SaveServlet"
)
@WebServlet
(
"
../java/Postulante
/SaveServlet"
)
public
class
SaveServlet
{
public
class
SaveServlet
{
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
...
@@ -24,6 +25,7 @@ public class SaveServlet {
...
@@ -24,6 +25,7 @@ public class SaveServlet {
boolean
experienciaProgramando
=
false
;
boolean
experienciaProgramando
=
false
;
boolean
experienciaLaboral
=
false
;
boolean
experienciaLaboral
=
false
;
boolean
universidad
=
false
;
boolean
universidad
=
false
;
boolean
notebook
=
false
;
if
(
request
.
getParameter
(
"experiencia_laboral"
)
!=
null
){
if
(
request
.
getParameter
(
"experiencia_laboral"
)
!=
null
){
experienciaLaboral
=
true
;
experienciaLaboral
=
true
;
}
}
...
@@ -31,13 +33,13 @@ public class SaveServlet {
...
@@ -31,13 +33,13 @@ public class SaveServlet {
experienciaProgramando
=
true
;
experienciaProgramando
=
true
;
}
}
if
(
request
.
getParameter
(
"notebook"
)
!=
null
){
if
(
request
.
getParameter
(
"notebook"
)
!=
null
){
boolean
notebook
=
true
;
notebook
=
true
;
}
}
if
(
request
.
getParameter
(
"universidad"
)
!=
null
){
if
(
request
.
getParameter
(
"universidad"
)
!=
null
){
universidad
=
true
;
universidad
=
true
;
}
}
Bootcamp
bootcamp
=
new
Bootcamp
();
Postulante
postulante
=
new
Postulante
();
Postulante
postulante
=
new
Postulante
();
postulante
.
setNombre
(
nombre
);
postulante
.
setNombre
(
nombre
);
postulante
.
setApellido
(
apellido
);
postulante
.
setApellido
(
apellido
);
...
@@ -47,6 +49,8 @@ public class SaveServlet {
...
@@ -47,6 +49,8 @@ public class SaveServlet {
postulante
.
setDireccion
(
direccion
);
postulante
.
setDireccion
(
direccion
);
postulante
.
setExpLaboral
(
experienciaLaboral
);
postulante
.
setExpLaboral
(
experienciaLaboral
);
postulante
.
setEstudioUniversitario
(
universidad
);
postulante
.
setEstudioUniversitario
(
universidad
);
postulante
.
setNotebook
(
notebook
);
postulante
.
setBootcampId
(
1
);
int
status
=
PostulanteDao
.
save
(
postulante
);
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 @@
...
@@ -16,7 +16,7 @@
<div>
<div>
<p>
Si sigues interesado y cumples con los requisitos, completa el siguiente formulario:
</p>
<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>
<label
for=
"nombre"
>
Ingrese su Nombre:
</label>
<input
required
id=
"nombre"
type=
"text"
><br>
<input
required
id=
"nombre"
type=
"text"
><br>
...
@@ -40,9 +40,18 @@
...
@@ -40,9 +40,18 @@
<!-- Si no lo marca el valor que envia es null y si lo marca es "ON" -->
<!-- Si no lo marca el valor que envia es null y si lo marca es "ON" -->
<input
id=
"experiencia_laboral"
type=
"checkbox"
><br>
<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>
<input
id=
"experiencia_programando"
type=
"checkbox"
><br>
<label
for=
"notebook"
>
Cuenta con notebook:
</label>
<label
for=
"notebook"
>
Cuenta con notebook:
</label>
<input
id=
"notebook"
type=
"checkbox"
><br>
<input
id=
"notebook"
type=
"checkbox"
><br>
...
...
src/main/webapp/index.jsp
View file @
cb95be3a
<
%@
page
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<
%@
page
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<title>
JSP - Hello World
</title>
<title>
JSP - Hello World
</title>
</head>
</head>
<body>
<h1><
%=
"
Hello
World
!"
%
>
<body>
</h1>
<h1>
<br/>
<
%=
"
Hello
World
!"
%
>
<a
href=
"hello-servlet"
>
Hello Servlet
</a>
</h1>
</body>
<br/>
</html>
<a
href=
"hello-servlet"
>
Hello Servlet
</a><br>
\ No newline at end of file
<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