Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
proyecto-estandar
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
Israel Gutierrez Salazar
proyecto-estandar
Commits
b2133aa0
Commit
b2133aa0
authored
Apr 19, 2018
by
Alonso Moreno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fallo a la integracion de la validacion del token
parent
06ad5dfb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
RequestFilter.java
src/java/demojsoncrud/servlets/RequestFilter.java
+4
-5
No files found.
src/java/demojsoncrud/servlets/RequestFilter.java
View file @
b2133aa0
...
...
@@ -52,16 +52,15 @@ public class RequestFilter implements Filter, ServletContextListener {
}
else
{
if
(
isAJAXRequest
(
request
))
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
""
);
sb
.
append
(
"
<?xml version=\"1.0\" encoding=\"UTF-8\"?><partial-response><redirect url=\""
).
append
(
indexPath
).
append
(
"\"></redirect></partial-response>
"
);
response
.
setHeader
(
"Cache-Control"
,
"no-cache"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"text/xml"
);
PrintWriter
pw
=
response
.
getWriter
();
pw
.
println
(
sb
.
toString
());
pw
.
flush
();
return
;
}
response
.
sendRedirect
(
indexPath
);
//
response.sendRedirect(indexPath);
}
}
}
else
{
...
...
@@ -82,8 +81,8 @@ public class RequestFilter implements Filter, ServletContextListener {
private
boolean
isAJAXRequest
(
HttpServletRequest
request
)
{
boolean
check
=
false
;
String
facesRequest
=
request
.
getHeader
(
"
Faces-Request
"
);
if
(
facesRequest
!=
null
&&
facesRequest
.
equals
(
"
partial/ajax
"
))
{
String
facesRequest
=
request
.
getHeader
(
"
X-Requested-With
"
);
if
(
facesRequest
!=
null
&&
facesRequest
.
equals
(
"
XMLHttpRequest
"
))
{
check
=
true
;
}
return
check
;
...
...
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