Announcement Announcement Module
Collapse
No announcement yet.
IllegalStateException from call to response.sendRedirect in successfulAuthentication Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    If you are getting the same error - i.e. because the response is committed - then you'll need to debug the difference between the two containers to work out why one thinks it has and the other doesn't. It could be due to differences in response buffering or something. But it is a normal issue when dealing with the serlvet API - it isn't a Spring Security question.

    Comment


    • #17
      So, why with the same container, that works with Spring Security 2, but that doesn't with Spring Security 3?

      Comment


      • #18
        I don't know. Only you have access to your application so you'll have to work out at what point the response is committed and why. That happens before the redirect is called, once the server starts writing the output back to the client, so you have to use a debugger and track the response throughout the request.

        Comment


        • #19
          Originally posted by Luke Taylor View Post
          I don't know. ..., so you have to use a debugger and track the response throughout the request.
          I get the same error in the same situation on TC 5 with SS 3.0. In the onAuthenticationSuccess method of the SimpleUrlAuthenticationSuccessHandler class,

          Code:
          	public void onAuthenticationSuccess(HttpServletRequest request,
          			HttpServletResponse response, Authentication authentication)
          			throws IOException, ServletException {
          
                          super.onAuthenticationSuccess(request, response, authentication);
          
          ...
                }
          The exception no longer occurs after removing the invoking the same method in its super class and getting out the method, that is "return", right after invoking the sendRedirect.
          Last edited by vw729; Sep 16th, 2010, 06:33 PM.

          Comment

          Working...
          X