这是 login.jsp
<%--
Created by IntelliJ IDEA.
User: cxw
Date: 2022/4/25
Time: 9:46
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 1. 导入CSS的全局样式 -->
<link href="./css/bootstrap.min.css" rel="stylesheet" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<!-- 2. jQuery导入,建议使用1.9以上的版本 -->
<script src="js/jquery-3.4.1.min.js"></script>
<!-- 3. 导入bootstrap的js文件 -->
<script src="js/bootstrap.min.js">
</script>
<script type="text/javascript">
function refreshCode() {
//获取验证码图片对象
var vcode = document.getElementById("vcode");
//设置src属性,加时间戳
vcode.src ="${pageContext.request.contextPath}/checkCodeServlet?time="+new Date().getTime();
}
</script>
<style type="text/css">
td, th {
text-align: center;
}
</style>
<title>登录</title>
管理员登录
<div class="input-group input-group-lg">
<span class="input-group-addon" id="sizing-addon1">用户</span>
<label>
<input type="text" class="form-control" placeholder="Username" aria-describedby="sizing-addon1">
</label>
</div>
<br>
<div class="input-group input-group-lg">
<span class="input-group-addon" id="sizing-addon2">密码</span>
<label>
<input type="password" class="form-control" placeholder="password" aria-describedby="sizing-addon1">
</label>
</div>
<br>
<div class="form-inline">
<label for="vcode">验证码:</label>
<label for="vcode1"></label><input type="text" name="verfitycode" class="form-control" id="vcode1" placeholder="请输入验证码"/>
<a href="javascript:refreshCode()">
<img src="${pageContext.request.contextPath}/checkCodeServlet" title="看不清点刷新" id="vcode" alt="">
</a>
<hr>
<div class="form-group">
<input type="submit"value="登录" class="btn btn btn-primary">
</div>
</div>
</form>
<%-- 出错显示的信息框--%>
×
${login_msg}
</div>
</div>
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/250816049056142.png "#left")