Commit b2133aa0 by Alonso Moreno

fallo a la integracion de la validacion del token

parent 06ad5dfb
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment