jsp 登录次数限制的问题

来源:百度知道 编辑:UC知道 时间:2024/06/18 12:45:00
我想用jsp设计一网站,对于同一个用户在1分钟内如果连续登录三次都没有登陆成功,则执行另一操作(假设为打开一个应用程序吧,)
该如何写代码呢?
我想应该用application.setAttribute吧,但没能实现,请打下帮忙!

就只剩这些分了!
得到满意答案后,定追加到100分

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'z2.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="T