使用Cookie实现10天免登录
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>用户登陆页面</title>
</head>
<body>
<h3>用户登陆</h3>
<%
String zhh="";
String pwdd="";
String check1="";
Cookie [] cookies= request.getCookies();
if(cookies!=null){
for(int i=0;i<cookies.length;i++){
if("abc".equals(cookies[i].getName())){
//按照UTF-8进行解码
zhh= URLDecoder.decode(cookies[i].getValue(),"utf-8");
check1="checked";
}
if("cba".equals(cookies[i].getName())){
pwdd= cookies[i].getValue();
}
}
}
%>
<form action="servlet/LoginServlet" method="post">
<p>