Navigation of page between the two action
I am facing an issue just give u background of it. I have an application build using Spring MVC. After sign in I have page where I am doing some action on click of button "Accept" and on top of page I have "Log Off" button.
Here facing issue when I am clicking on "Accept" button doing some prepossessing and in between before completing this "Accept" action I am doing Log Off which actually clearing session and showing Log Off page. As some of the session attributes are used in Accept action I am getting Null Pointer Exception. When Null Pointer Exception is thrown I have written logic for redirecting control to Log In page with error message but for me Log Off page is shown.
My question is that, as my Log Off action is completed before Accept action and as exception is thrown in Accept action I am transferring control to Log In page. I am expecting Log In page with error to display but Log Off page is displayed. How the Spring MVC actions are working in this case, is it as per specification?