javaweb当登录之后怎么在session过期后自动跳转到登录页面

版权声明:博主原创转载请注明出处:https://blog.csdn.net/qq_42952331 https://blog.csdn.net/qq_42952331/article/details/85768870

web.xml配置:
在这里插入图片描述
错误页面配置:
在这里插入图片描述
代码:

<script language="JavaScript">
 alert("登录超时请重新登录!")
 top.location.href ="${pageContext.request.contextPath }/admin/login.jsp";
</script>

猜你喜欢

转载自blog.csdn.net/qq_42952331/article/details/85768870