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
f99c98ca
Commit
f99c98ca
authored
May 17, 2022
by
Jose Baez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'porfavorquetodosalgabien2' into 'develop'
Porfavorquetodosalgabien2 See merge request
!33
parents
75bec4ee
0eb7e68c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
55 deletions
+72
-55
.gitignore
+2
-0
.idea/misc.xml
+2
-1
src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java
+26
-12
src/main/java/com/roshka/proyectofinal/login/LoginServlet.java
+1
-1
src/main/webapp/formulario.jsp
+3
-2
src/main/webapp/menu.jsp
+38
-39
No files found.
.gitignore
View file @
f99c98ca
...
...
@@ -6,6 +6,7 @@ target/
### IntelliJ IDEA ###
.idea/gitmisc.xml
.idea/encodings.xml
.idea/misc.xml
.idea/**
.idea/modules.xml
.idea/jarRepositories.xml
...
...
@@ -14,6 +15,7 @@ target/
*.iws
*.iml
*.ipr
/encodings.xml
### Eclipse ###
.apt_generated
...
...
.idea/misc.xml
View file @
f99c98ca
...
...
@@ -10,7 +10,7 @@
</list>
</option>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
7
"
default=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
_8
"
default=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</project>
\ No newline at end of file
src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java
View file @
f99c98ca
...
...
@@ -4,6 +4,7 @@ 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.RequestDispatcher
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.annotation.WebServlet
;
import
jakarta.servlet.http.HttpServlet
;
...
...
@@ -18,13 +19,13 @@ import java.sql.Statement;
@WebServlet
(
"/SaveServlet"
)
public
class
SaveServlet
extends
HttpServlet
{
protected
void
do
Pos
t
(
HttpServletRequest
request
,
HttpServletResponse
response
)
protected
void
do
Ge
t
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
response
.
setContentType
(
"text/html"
);
PrintWriter
out
=
response
.
getWriter
();
boolean
rechazarDatos
=
false
;
int
bootcampActual
=
Integer
.
parseInt
(
request
.
getParameter
(
"bootcamp
_id
"
));
int
bootcampActual
=
Integer
.
parseInt
(
request
.
getParameter
(
"bootcamp"
));
try
{
Connection
con
=
DataBase
.
getConnection
();
...
...
@@ -107,25 +108,38 @@ public class SaveServlet extends HttpServlet {
}
if
(
status
>
0
){
//out.print("<p>Record saved successfully!</p>");
out
.
print
(
" <div class=\"alert\">\n"
+
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">×</span> \n"
+
" <strong>Formulario Cargado!</strong> EXITOSAMENTE CARGADO\n"
+
"</div>"
);
request
.
getRequestDispatcher
(
"formulario.jsp"
).
include
(
request
,
response
);
request
.
setAttribute
(
"bootcamp"
,
bootcampActual
);
RequestDispatcher
rd
=
request
.
getRequestDispatcher
(
"formulario.jsp"
);
rd
.
include
(
request
,
response
);
//RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp");
//rd.include(request, response);
}
else
{
if
(
rechazarDatos
){
out
.
print
(
" <div class=\"alert info\">\n"
+
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">×</span> \n"
+
" <strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n"
+
"</div>"
);
request
.
getRequestDispatcher
(
"formulario.jsp"
).
include
(
request
,
response
);
out
.
print
(
"<div class='alert info''>"
);
out
.
print
(
"<span class='closebtn'' onclick='this.parentElement.style.display='none';'>×</span>"
);
out
.
print
(
"<strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO"
);
out
.
print
(
"</div>"
);
//request.getRequestDispatcher("formulario.jsp").include(request, response);
request
.
setAttribute
(
"bootcamp"
,
bootcampActual
);
RequestDispatcher
rd
=
request
.
getRequestDispatcher
(
"formulario.jsp"
);
rd
.
include
(
request
,
response
);
}
else
{
out
.
println
(
"Error al cargar datos"
);
out
.
print
(
"
<div class=\"alert info error\">\n
"
+
"
<span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">×</span> \n"
+
"
<strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n"
+
out
.
print
(
"
<div class='alert info error'>
"
+
"<span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">×</span> \n"
+
"<strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n"
+
"</div>"
);
request
.
getRequestDispatcher
(
"formulario.jsp"
).
include
(
request
,
response
);
request
.
setAttribute
(
"bootcamp"
,
bootcampActual
);
RequestDispatcher
rd
=
request
.
getRequestDispatcher
(
"formulario.jsp"
);
rd
.
include
(
request
,
response
);
//request.getRequestDispatcher("formulario.jsp").include(request, response);
}
}
}
catch
(
Exception
ex
){
...
...
src/main/java/com/roshka/proyectofinal/login/LoginServlet.java
View file @
f99c98ca
...
...
@@ -78,7 +78,7 @@ public class LoginServlet extends HttpServlet {
catch
(
Exception
ignored
)
{
}
// Si no es posible redireccionar a la pagina solicitada, llevar a la main page
RequestDispatcher
rd
=
request
.
getRequestDispatcher
(
"menu.
html
"
);
RequestDispatcher
rd
=
request
.
getRequestDispatcher
(
"menu.
jsp
"
);
rd
.
include
(
request
,
response
);
}
else
{
...
...
src/main/webapp/formulario.jsp
View file @
f99c98ca
...
...
@@ -39,9 +39,9 @@ pageEncoding="UTF-8"%>
</p>
<p class="enter">Si sigues interesado y cumples con los requisitos, completa el siguiente formulario: </p>
<form method="
pos
t" action="SaveServlet" class="form">
<form method="
ge
t" action="SaveServlet" class="form">
<input type="hidden" name="bootcamp
_id" value="<%= request.getParameter("bootcamp
") %>">
<input type="hidden" name="bootcamp
" value="<%= request.getParameter(" bootcamp
") %>">
<label for="nombre">Ingrese su Nombre:</label>
<input required id="nombre" name="nombre" type="text"><br>
...
...
@@ -101,6 +101,7 @@ pageEncoding="UTF-8"%>
</article>
</main>
</body>
</html>
<script>
(function() {
...
...
src/main/webapp/menu.
html
→
src/main/webapp/menu.
jsp
View file @
f99c98ca
<!DOCTYPE html>
<html>
<head>
<link
rel=
"shortcut icon"
href=
"imagenes/roshkaicon.ico"
sizes=
"any"
/>
</head>
<style>
<
link
href
=
"https://fonts.googleapis.com/css2?family=Concert+One&family=Francois+One&family=Satisfy&family=Staatliches&display=swap"
rel
=
"stylesheet"
>
*
{
<
link
href
=
"https://fonts.googleapis.com/css2?family=Concert+One&family=Francois+One&family=Satisfy&family=Staatliches&display=swap"
rel
=
"stylesheet"
>*
{
box-sizing
:
border-box
;
}
}
body
{
body
{
font-family
:
'Concert One'
,
cursive
;
font-family
:
'Francois One'
,
sans-serif
;
font-family
:
'Satisfy'
,
cursive
;
font-family
:
'Staatliches'
,
cursive
;
font-size
:
13px
}
}
.header
,
.footer
{
background-color
:
rgb
(
18
,
18
,
98
);
.header
,
.footer
{
background-color
:
rgb
(
18
,
18
,
98
);
color
:
white
;
padding
:
60px
;
}
}
.column
{
.column
{
float
:
left
;
padding
:
30px
;
}
}
.clearfix
::after
{
.clearfix
::after
{
content
:
""
;
clear
:
both
;
display
:
table
;
}
}
a
{
color
:
white
;
}
a
{
color
:
white
;
}
.menu
{
.menu
{
width
:
50%
;
}
}
.content
{
.content
{
width
:
50%
;
}
}
.menu
ul
{
.menu
ul
{
list-style-type
:
none
;
margin
:
0
;
padding
:
0
;
}
}
.menu
li
{
.menu
li
{
padding
:
8px
;
margin-bottom
:
8px
;
background-color
:
rgb
(
18
,
18
,
98
);
color
:
#ffffff
;
}
}
.menu
li
:hover
{
.menu
li
:hover
{
background-color
:
rgb
(
18
,
18
,
98
);
}
}
</style>
</head>
<body>
<div
class=
"header"
>
<div
class=
"header"
>
<h1>
MENU TH
</h1>
<h2>
EN LOS SIGUIENTES LINKS PUEDE MODIFICAR, AGREGAR O ELIMINAR DATOS DE LA BASE DE DATOS DEL BOOTCAMP
</h2>
</div>
</div>
<div
class=
"column content"
>
<div
class=
"column content"
>
<h1>
PUEDE ACCEDER A LOS SIGUIENTES LINKS:
</h1>
</div>
<div
class=
"clearfix"
>
<div
class=
"clearfix"
>
<div
class=
"column menu"
>
<ul>
<li><a
href=
"#
"
>
MANAGE BOOTCAMP
</a></li>
<li><a
href=
"formulario_bootcamp.jsp
"
>
MANAGE BOOTCAMP
</a></li>
<li><a
href=
"filtros-postulante"
>
MANAGE POSTULANTE
</a></li>
<li><a
href=
"#
"
>
MANAGE LENGUAJES
</a></li>
<li><a
href=
"#
"
>
MANAGE PROFESORES
</a></li>
<li><a
href=
"#"
>
USUARIO NUEVO (ADMINISTRADOR)
</a></li>
<li><a
href=
"formulario_lenguaje.jsp
"
>
MANAGE LENGUAJES
</a></li>
<li><a
href=
"formulario_profesor.jsp
"
>
MANAGE PROFESORES
</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
</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