session退出页面

简单的session退出页面,jsp:

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">   
<html>
<head>
<title>退出</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
</head>
<body>
<%
if(session.getAttribute("commName")!=null)
{
    session.removeValue("commName");
}
if(session.getAttribute("adminName")!=null){
    session.removeValue("adminName");
}
%>
<!-- response.sendRedirect("/FlowerShop/main/body.jsp"); -->
</body>
<script type="text/javascript">
    window.open('first.jsp','_top');
</script>
</html>

原文地址:https://www.cnblogs.com/zrui-xyu/p/4829183.html