Index

Edit LoginServlet.java

You can use Eclipse at this point if you'd like. Just create a new project and point it the appfuse-lab directory.

  1. Edit LoginServlet.java to set cookies. This file is located in src/web/org/appfuse/webapp/action.
    if (request.getParameter("rememberMe") != null) {
        String passCookie = 
            StringUtil.encodeString(encryptedPassword);
            
        response =
            RequestUtil.setCookie(response, "rememberMe", 
                                  "true", false);
        response =
            RequestUtil.setCookie(response, "password",
                                  passCookie, false);
    }
    

    Note: The username cookie is already set via JavaScript in loginForm.jsp. The script is located in web/scripts/login.js.

Slide No: 4