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