I have Load balancer for balancing load between two nodes.
When a User logs out, am hitting the same login page back. If User was logged into node1 , after logout, I want to take User to node2.
Redirection rule put in Load balancer is not working (Rule is mentioned below). So , am thinking of removing JSESSIONDID when User logs out assuming that now it might go to a different node.
Before log out I need to invalidate session. If I follow below steps,
1. Remove JSESSIONID
2. session.invalidate();
In above case, if JSESSIONID is removed before invalidating session, will it invalidate the session? Because SESSIOND ID is already removed
1. session.invalidate();
2. Remove JSESSIONDID
In this case, I have already invalidated the session. So, will I be able to remove JSESSIONID?
Redirection rule:
if ( ($url == "loginPageURL") && ( http.getcookie( "JSESSIONID" ) == "" ))
{
http.setcookie( "JSESSIONID", "" );
}