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. onblur onchange onclick EN APEX ORACLE
  2. illustrator cs3 initialization crash
  3. time capsule 500g default ip address
  4. how to fix error recovery my27
  5. hp m1319f no print cartridge error
  6. java deconfig for old jav r12
  7. xai class http
  8. cisco ise authentication failure
  9. W2AS
  10. 7PBZ
Copyrights 2019 Fcffair BigData Resource, All rights reserved