-
FEATURED COMPONENTS
First time here? Check out the FAQ!
When we access the index of our application, if we do not have an open session, it directs us to a login screen where we access the application. If instead of going to the index we access the login directly, it opens three sessions instead of one.
Does anyone have an idea why it happens?
P.D.We have this listener to create the sessions
<listener>
<description>My Session Listener</description>
<display-name>My Session Listener</display-name>
<listener-class>org.sts.generales.EventosAplicacion.ControladorSesiones</listener-class>
</listener>
Hi there,
A good thing to check would be at client side, browser developer tools, network panel. Check the "preserver logs" checkmark, and look for session information on the requests going from the client to the ZK server.
Session info will either be a cookie (called JSESSIONID if you didn't explicitly renamed it), or a url parameter added at the end of the request string. If this session info is missing, the server will generate a new session upon receiving the request.
If you are creating 3 session, there is a good chance that your are sending 3 requests to the ZK server, each missing session info.
As for why that might happen, it is possible that your login process redirects the user to a different login page (or SSO, etc.), which replies whith a callback to your original page (maybe with a full redirect, or a 302 redirect) which doesn't maintain session info between requests.
Asked: 2020-10-02 00:11:32 +0800
Seen: 6 times
Last updated: Oct 05 '20