If caching is a problem, add the following lines to the top of your JSP
<% response.setHeader("Cache-Control","no-cache no-store"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %>
If this does not solve the problem ... you can see how you process the displayed code and the invalid session.
The best approach:
When creating a session, assign a named attribute. To print an expression, check for a named attribute. If a named attribute is found ... print a message; otherwise, do this. When logging out ... do session.invalid ()
Let me know what worked ... and we can delve into that
source share