<%@ page language="java" contentType="text/html;charset=GBK" errorPage="error.jsp"%>
<html>
<head>
<title>安全退出2</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="F7FCFE" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br><br><br><br><br><br><br><br><br><br><br><br>
<center>
<font color=red size=5>
安全退出2
</font>
</center>
<%
//...
response.setHeader("Cache-Control","no-cache"); //强制caches获得从服务器的一份新的拷贝
response.setHeader("Cache-Control","no-store"); //设置caches在任何情况下不保存网页
response.setDateHeader("Expires", 0); //使得代理cache把网页当作过期的
response.setHeader("Pragma","no-cache"); //HTTP 1.0后退兼容性
String userName = (String) session.getAttribute("username");
if (null == userName) {
   request.setAttribute("Error", "Session has ended.  Please login.");
   //RequestDispatcher rd = request.getRequestDispatcher("login.jsp");
   //rd.forward(request, response);
}
//...
%>
<form name="form1" method="post" action="logout2.jsp">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<center>
<tr> 
<td width="600" height="18" bgcolor="F7FCFE">&nbsp;</td>
<td width="200" height="18" bgcolor="F7FCFE">用户名：</td>
<td width="400" height="18" bgcolor="F7FCFE">
<input name="username" type="text" size="20">
</td>
</tr>
<tr> 
<td width="600" height="18" bgcolor="F7FCFE">&nbsp;</td>
<td width="200" height="18" bgcolor="F7FCFE" class="s">密 码：</td>
<td width="400" height="18" bgcolor="F7FCFE">
<input name="password" type="password" size="20">
</td>
</table>
<br><br><br><br>
<center>
<input name="提交" type="submit" >
<input name="重填" type="reset" >
</center>
</form>
</body>
</html>