I'm developing a website using javascript, jspx, and java (Spring using Mvc). I have an admin profile where I can shut down sessions from another logged users, my problem is that when I log out those users they stay in the page they were, and they are redirected to the log-in page when they click in another link, so, they are not aware that they were log out after they try to move to another page in the website. Is there a way that I can redirect them immediately after I shut them down?
PD: To shut their session down I'm using sessionRegistryImpl.
sessionRegistryImpl.getSessionInformation("userId").expireNow();
Thank you!
You could try and use
HttpServletRequest requestandHttpServletResponse response, after you expire the session use the response method to redirect