81,092
社区成员
发帖
与我相关
我的任务
分享
LoginModel loginModel = (LoginModel) session.getAttribute("CURRUSER");
if(session.getAttribute("CURRUSER") == null) {
// session中没有登陆信息或登陆超时
request.setAttribute("info", "请以管理员身份登录!");
String url = "/pages/adminlogin.jsp";
request.getRequestDispatcher(url).forward(request, response);
return;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=GBK" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title></title>
</head>
<body>
<jsp:forward page="/pages/index.html"/>
</body>
</html>
<%
if(request.getSession()==null){
response.sendRedirect("login.html");
}else{
}
%>