When the session timeout occurs, the page request is relocated to the login interface. Most of the use of Ajax dynamic local requests, resulting in the return landing page is nested in the local area of the system interface, not the desired effect. General page main layout using the IFRAME framework for segmentation, or simple practical table and other implementation of the same style effect, in this brief introduction of background page redirection to the landing interface back to the front desk, the front desk to re-direct to the landing interface to achieve the landing interface is flawless.
Add the following to the landing interface JSP polygon:
<%@ page language= "java" contenttype= "Text/html; charset=utf-8"%><% string path = request.getcontextpath (); string basepath = request.getscheme () + "://" + request.getservername () + ":" + request.getserverport () + path + "/"; %><script type= "Text/javascript" > // page initialization, we use timer processing // If you use OnLoad or jquery's $ (document). Read ( function () {...}); may not be able to achieve results. Local conditions var initscript = setinterval (function () { // case for IFRAME nesting if (window.top!=null && window.top.document.url!=document. URL) { Clearinterval (Initscript); window.top.location.href = document. url; } // for table layouts, non-IFRAME scenarios if (document.getElementById ("You have an element ID in the header area of your page") { clearinterval (initscript);window.top.location.href = "<%=basePath%> your Landing Interface relative path"; } },400);</script>
The method of resolving session timeout jump to landing page and jump out of iframe frame or local area in JSP