用户修改界面update.jsp
<html>
<head>
<title>update</title>
<link rel="stylesheet" href="css/updateUser.css">
</head>
<body style="margin: 0 100px">
<div class="container">
<h1 id="h">修改信息</h1>
<%if (request.getAttribute("error") != null){%>
<p style="color:red;"><%=request.getAttribute("error")%></p>
<%}%>
<form action="updateUser" method="post" class="updateForm">
<div class="update-nav">
<label>ID不可改</label>
<input type="text" name="id" value="${user.id}" readonly class="id">
</div>
<div class="update-nav">
<label>
<div class="nav">修改账号</div>
</label>
<input type="text" name="account" value="${user.account}">
</div>
<div class="update-nav">
<label>
<div class="nav">修改密码</div>
</label>
<input type="password" name="password" value="${user.password}">
</div>
<div class="update-nav">
<label>
<div class="nav">修改邮箱</div>
</label>
<input type="email" name="email" value="${user.email}">
</div>
<div class="sure-nav">
<input class="make-sure" type="submit" value="确认修改">
<a href="${pageContext.request.contextPath}/queryAll">返回用户列表</a>
</div>
</form>
</div>
</body>
</html>
添加用户界面addUser.jsp
<html>标签:Javaweb,update,用户,修改,期末,作品,jsp,ID From: https://www.cnblogs.com/mayekun/p/17413371.html
<head>
<title>update</title>
<link rel="stylesheet" href="css/updateUser.css">
</head>
<body style="margin: 0 100px">
<div class="container">
<h1 id="h">修改信息</h1>
<%if (request.getAttribute("error") != null){%>
<p style="color:red;"><%=request.getAttribute("error")%></p>
<%}%>
<form action="updateUser" method="post" class="updateForm">
<div class="update-nav">
<label>ID不可改</label>
<input type="text" name="id" value="${user.id}" readonly class="id">
</div>
<div class="update-nav">
<label>
<div class="nav">修改账号</div>
</label>
<input type="text" name="account" value="${user.account}">
</div>
<div class="update-nav">
<label>
<div class="nav">修改密码</div>
</label>
<input type="password" name="password" value="${user.password}">
</div>
<div class="update-nav">
<label>
<div class="nav">修改邮箱</div>
</label>
<input type="email" name="email" value="${user.email}">
</div>
<div class="sure-nav">
<input class="make-sure" type="submit" value="确认修改">
<a href="${pageContext.request.contextPath}/queryAll">返回用户列表</a>
</div>
</form>
</div>
</body>
</html>