Package DAO

Examples of DAO.JDBCUserDAO


  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    UserDAOInterface user = new JDBCUserDAO();
    user.activate(request.getParameter("id"));
    request.setAttribute("showMessage", "Votre compte � bien �t� valid� !");
    request.getRequestDispatcher("index.jsp").forward(request, response);
    return;
  }
View Full Code Here


  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   
    JDBCUserDAO userDAO = new JDBCUserDAO();
    if(userDAO.checkIfExistAndValidate(request.getParameter("login"), request.getParameter("pwd"))){
      User user =userDAO.getUser(request.getParameter("login"));
      request.getSession().setAttribute("user",user);
      if(user.getDateFinAbonnementFormatDate()!=null){
        if(user.getDateFinAbonnementFormatDate().compareTo(new Date()) > 0){
          request.getSession().setAttribute("allowed","true");
        }
View Full Code Here

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    UserDAOInterface userDAO = new JDBCUserDAO();
    User user=(User)request.getSession().getAttribute("user");
    boolean verifie=userDAO.codeVerification(user, request.getParameter("code"));
    System.out.println("verifie"+verifie);
    if( verifie){
      request.getSession().setAttribute("allowed","true");
    }
    request.getRequestDispatcher("index.jsp").forward(request, response);
View Full Code Here

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    SendMail t = new SendMail();
    UserDAOInterface userDAO = new JDBCUserDAO();
    User user=(User)request.getSession().getAttribute("user");
    String code =userDAO.createAbonnement(user.getLogin(),request.getParameter("duree"));
    try {
      String content="Merci de vous �tres abonn�s sur notre site de jeux en ligne" +
          "<br>"+user.getLogin()+"Voici votre code d'acc�s pour "+request.getParameter("duree")+" mois de fun !  :" +
          "<br> Code :"+code;
         
View Full Code Here

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    UserDAOInterface user = new JDBCUserDAO();
    if(request.getParameter("inscriptionNL") !=null && request.getParameter("inscriptionNL").equals("true") ){
      user.newsLetter(true,((User)request.getSession().getAttribute("user")).getLogin());
    }else{
      user.newsLetter(false,((User)request.getSession().getAttribute("user")).getLogin());
    }
    request.getSession().setAttribute("user",(user.getUser(((User)request.getSession().getAttribute("user")).getLogin())));
    request.getRequestDispatcher("compte.jsp").forward(request, response);
    return;
  }
View Full Code Here

      t.run(request,"Validation inscription jeux IN56",content,request.getParameter("email"));
    } catch (MessagingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    UserDAOInterface a = new JDBCUserDAO();
   
    a.create(request.getParameter("login"),request.getParameter("pwd"),request.getParameter("email"));
    request.getRequestDispatcher("index.jsp").forward(request, response);
    return;
  }
View Full Code Here

TOP

Related Classes of DAO.JDBCUserDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.