<%--Created by IntelliJ IDEA.User: CHENDate: 2019年4月30日Time: 21:26To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="java" import="com.imooc.*" errorPage="error.jsp" %><%@ page import="com.imooc.bean.Emp" %><%@ page import="com.imooc.db.DBUtil" %><%@ page import="java.util.Map" %><html><head><title>这是一个登录的处理程序</title></head><body><%String account = request.getParameter("account");String password = request.getParameter("password");session.setAttribute("account01",account);session.setMaxInactiveInterval(5*60);Emp emp = new Emp(account,null,password,null);Map<String,Emp> map = DBUtil.map;if(DBUtil.selectEmpByAccountAndPassword(emp)){Object o = application.getAttribute("count");if(o==null){application.setAttribute("count",1);}else {int count = Integer.parseInt(o.toString());application.setAttribute("count",count+1);}%><h3 align="center">欢迎来到人事管理系统的首页!</h3><h3 align="right"><%= session.getAttribute("account01")%></h3><h3>这是第<%= application.getAttribute("count")%>次访问本页。</h3><table align="center" border="1" width="500px"><tr><td>账号</td><td>姓名</td><td>邮箱</td><td>密码</td><td>修改</td></tr><%for(String key:map.keySet()){Emp e = map.get(key);%><tr><td><%= e.getAccount()%></td><td><%= e.getName()%></td><td><%= e.getEmail()%></td><td><%= e.getPassword()%></td><td><!--利用url传递数据--><a href="update.jsp?account=<%=e.getAccount()%>&email=<%= e.getEmail()%>&name=<%= e.getName()%>">修改</a></td></tr><%}%></table><%}else {throw new Exception("error!");}%></body></html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。