hello.jsp

来源:互联网 发布:ipad淘宝怎么退出登录 编辑:程序博客网 时间:2024/06/02 11:56

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>hello.jsp</title>
</head>

<body>
<%
Object a = session.getAttribute("login");
if(a != null)
{
  String isLogin = (String) a;
  if(isLogin.equals("true"))
  {
%>
KF 欢迎你!
<% }
   else { %>
       请重新<a href="index.html">登录</a>
     <% }
}
else{ %>
请先 <a href="index.html">登录</a>!
<% } %>

</body>
</html>

//Errorpage.jsp 参见前面的Errorpage.jsp
 

原创粉丝点击