Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I accidentally figured this out shortly after posting the question. Answering here in case it becomes of some use to someone else down the road.</p> <p>In the <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/web/authentication/AuthenticationFailureHandler.html#onAuthenticationFailure%28javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse,%20org.springframework.security.core.AuthenticationException%29" rel="nofollow"><code>onAuthenticationFailure()</code></a>, I passed <code>/account/login</code> to <a href="http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRequestDispatcher%28java.lang.String%29" rel="nofollow"><code>getRequestDispatcher()</code></a>, and I also called <a href="http://docs.oracle.com/javaee/6/api/javax/servlet/RequestDispatcher.html#include%28javax.servlet.ServletRequest,%20javax.servlet.ServletResponse%29" rel="nofollow"><code>include()</code></a> rather than a <a href="http://docs.oracle.com/javaee/6/api/javax/servlet/RequestDispatcher.html#forward%28javax.servlet.ServletRequest,%20javax.servlet.ServletResponse%29" rel="nofollow"><code>forward()</code></a>, like so:</p> <pre><code>@Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { request.getRequestDispatcher("/account/login").include(request, response); } </code></pre> <p>Submitting the login form with an incorrect username and/or password causes the login form JSP to be served as the POST's response, and submitting the correct username/password still invokes my <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/web/authentication/UsernamePasswordAuthenticationFilter.html" rel="nofollow"><code>UsernamePasswordAuthenticationFilter</code></a>!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload