Package java.util.logging

Examples of java.util.logging.Logger.fine()


  private static final long serialVersionUID = 1L;

  @Override
  public String getUsername(String accessToken) {
    Logger logger = Logger.getLogger(FacebookServiceImpl.class.getName());
    logger.fine("Retrieving username for facebook acces token : " + accessToken);
    String username;
    try {
      username = FacebookHelper.getUsername(accessToken);
    }
    catch (FacebookOAuthException e) {
View Full Code Here


  protected void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
   
    Logger logger = Logger.getLogger(RegisterPlayerServlet.class.getName());
   
    logger.fine("Got request from url : " + req.getRequestURL().toString());
   
    handleRegularRegistration(req,resp);
   
  }
View Full Code Here

  private void handleRegularRegistration(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
   
    Logger logger = Logger.getLogger(RegisterPlayerServlet.class.getName());
   
    logger.fine("started handling regular registration request");
   
    PrintWriter out = resp.getWriter();
   
    /* Get registration details from the request */
    String name = req.getParameter("nickname");;
View Full Code Here

    String name = req.getParameter("nickname");;
    Long score = Long.parseLong(req.getParameter("score"));;
    String email = req.getParameter("email");
    String password = req.getParameter("password");
   
    logger.fine("request parameters are : name=" + name + " | " + "score=" + score + " | " + "email=" + email + " | " + "password=" + password);
   
    /* Validate the form server side */
    List<String> errors = FormValidator.validateForm(name, email, password);
       
    if (errors.size() == 0) { // no erros, can register
View Full Code Here

    /* Validate the form server side */
    List<String> errors = FormValidator.validateForm(name, email, password);
       
    if (errors.size() == 0) { // no erros, can register
     
      logger.fine("the request has been validated on the server, adding to database");
     
      /* Remove this cookie, it will be replace with the "highscore" cookie */
      CookieUtils.eraseCookie(req, resp, "tempScore");
     
      /* Create a regular player */
 
View Full Code Here

      resp.addCookie(new Cookie("nickname", name));
      resp.addCookie(new Cookie("highscore", score + ""));
     
      if (email.equals("")) { // A player has not registered for notification, no need to send validation mail
       
        logger.fine("added to databse succesfully");
       
        out.println("Congrats, you have registered succesfully");
        out.println("<a href='http://stewiemaze.appspot.com'>Return to game</a>");
      }
      else {
View Full Code Here

        out.println("<a href='http://stewiemaze.appspot.com'>Return to game</a>");
      }
      else {
            try { // A player has registered for notifications, needs to verify the given email
             
              logger.fine("added to databse succesfully");
              logger.fine("sending an activation email to :" + email);
             
              MailUtils.sendValidationMail(email, name);
              out.println("Please verify your account by reading the message we have just sent you");
              out.println("<br>");
View Full Code Here

      }
      else {
            try { // A player has registered for notifications, needs to verify the given email
             
              logger.fine("added to databse succesfully");
              logger.fine("sending an activation email to :" + email);
             
              MailUtils.sendValidationMail(email, name);
              out.println("Please verify your account by reading the message we have just sent you");
              out.println("<br>");
              out.println("After that, click <a href='http://2.stewiemaze.appspot.com'>Here</a> to return to the game");
View Full Code Here

      }
    }
    else { // Errors exist in the form, let the user know and offer to return to the application. the users score is saved in the tmpScore cookie
      for (String error : errors) {
       
        logger.fine("request validation failed on the server");
       
        out.println(error);
        out.println("<a href='http://stewiemaze.appspot.com'>Return to game</a>");
     
    }
View Full Code Here

  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
   
    Logger logger = Logger.getLogger(RegisterFacebookPlayerServlet.class.getName());
   
    logger.fine("Got request from url : " + req.getRequestURL().toString());
   
    handleFacebookRegistration(req,resp);
 
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.