Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FileNook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sanblas
FileNook
Commits
f9615eb0
Commit
f9615eb0
authored
May 21, 2019
by
Fnac
Browse files
Options
Downloads
Patches
Plain Diff
Categorias
parent
645ab785
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source Packages/servlet/crearNookSV.java
+21
-5
21 additions, 5 deletions
Source Packages/servlet/crearNookSV.java
web/crearNook.jsp
+12
-2
12 additions, 2 deletions
web/crearNook.jsp
web/inicial.jsp
+2
-6
2 additions, 6 deletions
web/inicial.jsp
with
35 additions
and
13 deletions
Source Packages/servlet/crearNookSV.java
+
21
−
5
View file @
f9615eb0
...
...
@@ -44,7 +44,9 @@ public class crearNookSV extends HttpServlet {
throws
ServletException
,
IOException
{
String
nombre
=
request
.
getParameter
(
"nombre"
);
String
etiquetas
=
request
.
getParameter
(
"etiquetas"
);
String
etiquetas1
=
request
.
getParameter
(
"etiquetas1"
);
String
etiquetas2
=
request
.
getParameter
(
"etiquetas2"
);
String
etiquetas3
=
request
.
getParameter
(
"etiquetas3"
);
String
resumen
=
request
.
getParameter
(
"resumen"
);
java
.
util
.
Date
date
=
new
java
.
util
.
Date
();
...
...
@@ -70,12 +72,26 @@ public class crearNookSV extends HttpServlet {
int
idNook
=
nookCreado
.
getIdNook
();
ClasificacionCategorias
categoria
=
new
ClasificacionCategorias
();
ClasificacionCategorias
categoria
1
=
new
ClasificacionCategorias
();
categoria
.
setIdNook
(
idNook
);
categoria
.
setCategoria
(
etiquetas
);
categoria
1
.
setIdNook
(
idNook
);
categoria
1
.
setCategoria
(
etiquetas
1
);
clasificacionCategoriasDB
.
insert
(
categoria
);
clasificacionCategoriasDB
.
insert
(
categoria1
);
ClasificacionCategorias
categoria2
=
new
ClasificacionCategorias
();
categoria1
.
setIdNook
(
idNook
);
categoria1
.
setCategoria
(
etiquetas2
);
clasificacionCategoriasDB
.
insert
(
categoria2
);
ClasificacionCategorias
categoria3
=
new
ClasificacionCategorias
();
categoria1
.
setIdNook
(
idNook
);
categoria1
.
setCategoria
(
etiquetas3
);
clasificacionCategoriasDB
.
insert
(
categoria3
);
String
url
=
"/agregarArchivo.jsp"
;
RequestDispatcher
dispatcher
=
getServletContext
().
getRequestDispatcher
(
url
);
...
...
This diff is collapsed.
Click to expand it.
web/crearNook.jsp
+
12
−
2
View file @
f9615eb0
...
...
@@ -43,8 +43,18 @@ and open the template in the editor.
</div>
<div
class=
"partes"
>
<label
for=
"etiquetas"
class=
"etiquetasNook"
style=
"padding-right: 2em;"
>
Etiquetas:
</label>
<input
class=
"tablaNooktext"
name=
"etiquetas"
required
>
<label
for=
"etiquetas1"
class=
"etiquetasNook"
style=
"padding-right: 2em;"
>
Categoras:
<br></label>
<input
class=
"tablaNooktext"
name=
"etiquetas1"
required
>
</div>
<div
class=
"partes"
>
<label
for=
"etiquetas2"
class=
"etiquetasNook"
"
></label>
<input
class=
"tablaNooktext"
name=
"etiquetas2"
required
>
</div>
<div
class=
"partes"
>
<label
for=
"etiquetas3"
class=
"etiquetasNook"
"
></label>
<input
class=
"tablaNooktext"
name=
"etiquetas3"
required
>
</div>
<div
class=
"partes"
>
...
...
This diff is collapsed.
Click to expand it.
web/inicial.jsp
+
2
−
6
View file @
f9615eb0
...
...
@@ -39,10 +39,6 @@ and open the template in the editor.
<main
class=
"main"
>
<div
class=
"container"
>
<div
class=
"proyectos-inicial"
>
<form
class=
"search-bar"
method=
"post"
action=
"/buscarSV"
>
<input
type=
"search"
placeholder=
"🔍 Busca aqu nooks..."
name=
"search"
required
>
<div
class=
"clearfix"
>
...
...
@@ -59,7 +55,7 @@ and open the template in the editor.
ArrayList
<
Nook
>
nooksP
=
(
ArrayList
<
Nook
>
)
request
.
getAttribute
(
"nooksPopulares"
);
for
(
int
i
=
0
;
i
<
nooksP
.
size
();
i
++){
%>
<div
class=
"item"
><a
href=
'/nookSV?idNook=
<%=
nooksP
.
get
(
i
).
getIdNook
()
%>
'
><div
class=
"item-link"
><%=
nooksP
.
get
(
i
).
getNombre
()
%></div></a></div>
<div
class=
"item"
><a
href=
'/nookSV?idNook=
<%=
nooksP
.
get
(
i
).
getIdNook
()
%>
'
><div
class=
"item-link"
><%=
nooksP
.
get
(
i
).
getNombre
()
%><
br>
Valoracin media:
<%=
nooksP
.
get
(
i
).
getValoracionMedia
()
%><
/div></a></div>
<%
}
%>
</div>
<div
class=
"MS-controls"
>
...
...
@@ -75,7 +71,7 @@ and open the template in the editor.
ArrayList
<
Nook
>
nooksD
=
(
ArrayList
<
Nook
>
)
request
.
getAttribute
(
"nooksDescargas"
);
for
(
int
i
=
0
;
i
<
nooksD
.
size
();
i
++){
%>
<div
class=
"item"
><a
href=
'/nookSV?idNook=
<%=
nooksD
.
get
(
i
).
getIdNook
()
%>
'
><div
class=
"item-link"
><%=
nooksD
.
get
(
i
).
getNombre
()
%></div></a></div>
<div
class=
"item"
><a
href=
'/nookSV?idNook=
<%=
nooksD
.
get
(
i
).
getIdNook
()
%>
'
><div
class=
"item-link"
><%=
nooksD
.
get
(
i
).
getNombre
()
%><
br><br>
N de descargas:
<%=
nooksD
.
get
(
i
).
getDescargas
()
%><
/div></a></div>
<%
}
%>
</div>
<div
class=
"MS-controls"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment