Trying to do the same on a JBOSS server (Tomcat) due to JAAS security issues using GET methods, I tried in various ways.
Using the web.xml security restriction on the url / j_security_check template to use only POST - this does not work for the JAAS mechanism, as for regular servlets.
, , GET, j_security_check. - .
, POST j_security_check. , JAAS - .
, JAAS.
:
HttpServletRequest req = (HttpServletRequest) request;
if (req.getMethod().equals("GET")) {
log.warn("Someone is trying to use a GET method to login!!");
request.getRequestDispatcher("/login.jsp").forward(req, response);
throw new ServletException("Using a GET method on security check!");
}
.