Session expired, no logout page displayed

Advertisement
November 30

Hi, everyone:
I have been stuck here for a long time. I try to detect session expires and display a logout page.
I tried in the servlet if session.get("username") == null) then forward to logout.jsp, it never reach that page
I also tried using javascript:
<SCRIPT LANGUAGE="JavaScript">
var username = <%=session.getAttribute("username")%>
if (nickname == null)
location.href = 'logout.jsp';
if (parent.frames.length != 0) {
top.location.href = 'logout.jsp';
</SCRIPT>
I never reach the logout page, it display a login page by default. I think the session.getAttribute or value is not working because the session is already expired.
It's such a headache, does anyone has the same problem and find the solution.
I guess it may talke more code either in javascript to detect the session or in a servlet, but how to do it especially if the current pages are in a framesets.
Appreciated any code!!
ann

Advertisement

Replay

1)Are the managed servers part of a Cluster? If they are not part of a cluster, then the session replication will not work.
2)Deploy the application to cluster NOT to two managed servers
3)Check the cookie settings - name and domain

View 3 Replies

Tags:

  1. how to enable mosh in Cisco routers
  2. launchctl command not found
  3. LFJ9
  4. 09MY
  5. F990
  6. solar7s3
  7. barnduu
  8. arei54
  9. boymt5
  10. steadydiz
Copyrights 2019 Fcffair BigData Resource, All rights reserved