struts-sandbox/mailreader-course/struts/lab-2-1-src/java/org/apache/struts/apps/mailreader/course/LogonAction.java [69:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ActionForward execute(
            ActionMapping mapping,
            ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response)
            throws Exception {

        // Retrieve user
        String username = doGet(form, USERNAME);
        String password = doGet(form, PASSWORD);
        ActionMessages errors = new ActionMessages();
        User user = doGetUser(username, password, errors);

        // Report back any errors, and exit if any
        if (!errors.isEmpty()) {
            return doInputForward(mapping, request, errors);
        }

        // Cache user object in session to signify logon
        doCacheUser(request, user);

        // Done
        return doFindSuccess(mapping);

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



struts-sandbox/mailreader-course/struts/lab-1-4-src/java/org/apache/struts/apps/mailreader/course/LogonAction.java [69:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ActionForward execute(
            ActionMapping mapping,
            ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response)
            throws Exception {

        // Retrieve user
        String username = doGet(form, USERNAME);
        String password = doGet(form, PASSWORD);
        ActionMessages errors = new ActionMessages();
        User user = doGetUser(username, password, errors);

        // Report back any errors, and exit if any
        if (!errors.isEmpty()) {
            return doInputForward(mapping, request, errors);
        }

        // Cache user object in session to signify logon
        doCacheUser(request, user);

        // Done
        return doFindSuccess(mapping);

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



