That would be useful, so that I don't have to check if session is valid before interacting with the currently login user. Even nicer if I could tell Spring to automatically redirect user to the login page if sesssion is already timed out.
There's a similar question here:Logout/Session timeout catching with spring security but what I really need is something more intuitive and elegant. Is that possible?
Actually
will already do this. If the user requests a secured page and is not logged in (that also happens when the session isn't available due to a timeout), spring security sends a redirect to the specified
login-page.http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ns-config.html#ns-form-and-basic