首先,利用jsp技术写出登陆页面
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户登录</title>
</head>
<body>
<h1>用户登录</h1>
<form action="/CookieProject/login" method="post">
<table>
<tr>
<td><lable for="username_1">用户名</lable></td>
<td><input type="text" name="username" id="username_1"><