Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DemoRest
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Percy Quispe Huarcaya
DemoRest
Commits
c00e6358
Commit
c00e6358
authored
Apr 23, 2018
by
Percy Quispe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correcciones
parent
7918d928
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
RequestFilter.java
src/java/demojsoncrud/servlets/RequestFilter.java
+9
-2
mantenimientoPersona.jsp
web/vistas/mantenimientoPersona.jsp
+1
-1
reportePersona.jsp
web/vistas/reportePersona.jsp
+1
-1
No files found.
src/java/demojsoncrud/servlets/RequestFilter.java
View file @
c00e6358
...
...
@@ -51,6 +51,7 @@ public class RequestFilter implements Filter, ServletContextListener {
if
(
url
.
contains
(
login
)
||
url
.
contains
(
plantilla
)
||
url
.
contains
(
js
)||
url
.
contains
(
"index.jsp"
)||
url
.
contains
(
"main.jsp"
))
{
chain
.
doFilter
(
request
,
response
);
}
else
{
PostRequest
postRequest
=
new
PostRequest
(
urlRequested
);
JSONObject
valid
=
null
;
String
auth
=
""
;
if
(
url
.
contains
(
".jsp"
)){
...
...
@@ -65,8 +66,14 @@ public class RequestFilter implements Filter, ServletContextListener {
}
else
{
auth
=
request
.
getHeader
(
"Authorization"
);
}
PostRequest
postRequest
=
new
PostRequest
(
urlRequested
);
respuesta
=
postRequest
.
getRespueta
(
auth
);
try
{
respuesta
=
postRequest
.
getRespueta
(
auth
);
}
catch
(
Exception
ex
){
Response
.
ResponseBuilder
builder
=
null
;
sendError
(
response
);
builder
=
Response
.
status
(
Response
.
Status
.
UNAUTHORIZED
).
entity
(
response
);
throw
new
WebApplicationException
(
builder
.
build
());
}
valid
=
new
JSONObject
(
respuesta
);
if
(
valid
.
getBoolean
(
"status"
))
{
JSONObject
menu
=
new
JSONObject
(
valid
.
getString
(
"menu"
));
//Obtiene el menu
...
...
web/vistas/mantenimientoPersona.jsp
View file @
c00e6358
...
...
@@ -266,7 +266,7 @@
<script
src=
"../js/general.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/mantenimientoPersona.js"
type=
"text/javascript"
></script>
<!--mi js-->
<script
src=
"../js/pages/sidebar.js"
type=
"text/javascript"
></script>
</body>
</html>
web/vistas/reportePersona.jsp
View file @
c00e6358
...
...
@@ -106,7 +106,7 @@
<!--mi js-->
<script
src=
"../js/lib/validate_inputs.js"
type=
"text/javascript"
></script>
<script
src=
"../js/general.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/sidebar.js"
type=
"text/javascript"
></script>
<!--mi js-->
</body>
...
...
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