上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 94 下一页
摘要: 1 创建预更新用户查询持久层 Users selectUserByUserId(int userid); /** * 根据用户ID查询用户 * @param userid * @return */ @Overrid... 阅读全文
posted @ 2020-07-09 18:15 赵广陆 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 1 添加用户持久层 1.1 创建添加用户的持久层接口 public interface UserManagerDao { void insertUser(Users users);} 1.2 持久层用户添加的接口实现类 /** * 用户管理持久层 */p... 阅读全文
posted @ 2020-07-08 11:57 赵广陆 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 1 退出页面修改 退出登录 跳转至logout.do 2 退出登录的servlet /** * 用户退出登录 */@WebServlet("/logout.do")public class LogoutServlet extends HttpServlet ... 阅读全文
posted @ 2020-07-07 20:43 赵广陆 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1 验证码生成的servlet @WebServlet("/validateCode.do")public class ValidateCodeServlet extends HttpServlet { public void doGet(HttpServl... 阅读全文
posted @ 2020-07-07 19:51 赵广陆 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1 创建监听器 /** * 解决HttpSession被反复销毁的问题 */@WebListenerpublic class HttpSessionLifecycleListener implements HttpSessionListener { @O... 阅读全文
posted @ 2020-07-07 19:15 赵广陆 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1 修改处理登录请求的Servlet ServletContext servletContext = this.getServletContext(); HttpSession temp = (HttpSession) serv... 阅读全文
posted @ 2020-07-06 23:05 赵广陆 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 1 创建过滤器Filter进行登录过滤 /** * 判断当前游览器是否登录的Filter * * */@WebFilter(urlPatterns = {"*.do","*.jsp"})public class UserLoginFilter implemen... 阅读全文
posted @ 2020-07-06 16:42 赵广陆 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 1 创建servlet /** * 处理用户登录请求 */@WebServlet("/login.do")public class UserLoginServlet extends HttpServlet { @Override protected... 阅读全文
posted @ 2020-07-06 15:56 赵广陆 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1 创建用户登录接口 public interface UserLoginService { Users userLogin(String username,String userpwd);} 2 创建用户登录业务 /** * 用户登录业务 * */p... 阅读全文
posted @ 2020-07-06 11:25 赵广陆 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1 创建用户查询数据库的接口 public interface UserLoginDao { public Users selectUsersByUserPwd(String username,String userpwd);} 2 创建实现类 publ... 阅读全文
posted @ 2020-07-06 10:32 赵广陆 阅读(50) 评论(0) 推荐(0) 编辑
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 94 下一页