I am using Spring security feature in my application, but I found out that when the session expired, all the request ajax return the page login.jsp(not redirect, in http response, it puts all the html content) which is the login page of my webapp. I used a lot of ajax request in my app and the goal is return certain error code like 510 instead of the login page.
<session-management session-authentication-strategy-ref="example" />
without invalid-session-url I tried to make invalid-session-url = "", doesn't work. Many thanks