JSP实现简朴人事打点系统(2)

<%-- Created by IntelliJ IDEA. User: wangy Date: 2018/11/8 Time: 16:01 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" isErrorPage="true" %> <html> <head> <title>Title</title> </head> <body> <%=exception.getMessage()%> </body> </html>

update.jsp  修改员工信息页面

%-- Created by IntelliJ IDEA. User: wangy Date: 2018/11/8 Time: 15:27 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>员工更新页面</title> </head> <body> <h3>当前会见量:<%=application.getAttribute("count")%></h3> <h3>员工更新页面</h3> <%--获取session中的值并显示到页面上--%> <h3>登录账户:<%=session.getAttribute("account")%></h3> <hr> <form action="update-control.jsp"> <table> <tr> <%--value="<%=request.getParameter("account")%>"可用于实现数据的回显--%> <td>账号</td> <td><input type="text" value="<%=request.getParameter("account")%>"></td> </tr> <tr> <td>姓名</td> <td><input type="text" value="<%=request.getParameter("name")%>"></td> </tr> <tr> <td>邮箱</td> <td><input type="text" value="<%=request.getParameter("email")%>"></td> </tr> <tr> <td> <input type="submit" value="修改"> </td> </tr> </table> </form> </body> </html>

update-control  执行修改操纵的节制页面

<%-- Created by IntelliJ IDEA. User: wangy Date: 2018/11/9 Time: 9:46 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@page import="org.wang.db.*,org.wang.model.*" %> <%@ page import="java.util.Map" %> <html> <head> <title>Title</title> </head> <body> <% //获取map荟萃 Map<String,Emp> map = DBUtil.map; //修改信息 //获取当前需要修改的员工的account Emp emp = map.get(request.getParameter("account")); //把获取到的当前员工的信息从头set emp.setName(request.getParameter("name")); emp.setEmail(request.getParameter("email")); %> <h3>修改员工信息乐成</h3> </body> </html>

运行结果

登录界面

JSP实现简单人事解决系统

登录乐成后进入员工信息显示页面

JSP实现简单人事解决系统

修改员工信息(这里用了数据回显)

JSP实现简单人事解决系统

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsddgp.html