.
This commit is contained in:
17
WebRoot/JSPhandle/session.jsp
Normal file
17
WebRoot/JSPhandle/session.jsp
Normal file
@@ -0,0 +1,17 @@
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"
|
||||
pageEncoding="utf-8"%>
|
||||
<%@ page import="login.*" %>
|
||||
<%
|
||||
login in = new login();
|
||||
String actualname = request.getParameter("inputUser");
|
||||
boolean isLoginSucc = in.Login(actualname);
|
||||
if(isLoginSucc)
|
||||
{
|
||||
session.setAttribute("inputUser", actualname);
|
||||
session.setMaxInactiveInterval(1440);
|
||||
}
|
||||
else
|
||||
{
|
||||
out.println("<script>alert('登陆失败!');window.location.href='../index.html'</script>");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user