Best what you could do is to add a <meta http-equiv="refresh">
tag to the <head>
of the master template which redirects the page to the session timeout error page automatically whenever the session is expired. Since you're using a shared error page, you could pass the condition as a request parameter:
<meta http-equiv="refresh" content="${pageContext.session.maxInactiveInterval};url=error.jsp?type=timeout" />
and check it in the error.jsp
as follows:
<c:choose>
<c:when test="${param.type == 'timeout'}">
<p>Your session has been timed out.</p>
</c:when>
<c:otherwise>
<!-- Handle default case here. -->
</c:otherwise>
</c:choose>
Comments
Post a Comment