logout.jsp

来自「机械工业出版社的《jsp2.0动态网站开发实例指南》的源代码」· JSP 代码 · 共 20 行

JSP
20
字号
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="law.user" %>
<jsp:useBean id="log" class="law.user" scope="session"/>
<html>
<head><title>logout</title></head>
<body>
<center>
<%
	if(log.getLogin().equals("true")){
		session.invalidate();
		response.sendRedirect("index.htm");
	}
	else{
		out.print("<font color=#FF0000>您还没有登录。<br><a href='index.htm'>首页 </a>");
	}

%>
</center>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?