View Javadoc
1   /*
2    * This software was designed and created by Jason Carroll.
3    * Copyright (c) 2002, 2003, 2004 Jason Carroll.
4    * The author can be reached at jcarroll@cowsultants.com
5    * ITracker website: http://www.cowsultants.com
6    * ITracker forums: http://www.cowsultants.com/phpBB/index.php
7    *
8    * This program is free software; you can redistribute it and/or modify
9    * it only under the terms of the GNU General Public License as published by
10   * the Free Software Foundation; either version 2 of the License, or
11   * (at your option) any later version.
12   *
13   * This program is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   * GNU General Public License for more details.
17   */
18  
19  package org.itracker.web.actions.user;
20  
21  import org.apache.commons.beanutils.PropertyUtils;
22  import org.apache.log4j.Logger;
23  import org.apache.struts.action.*;
24  import org.itracker.PasswordException;
25  import org.itracker.core.AuthenticationConstants;
26  import org.itracker.model.User;
27  import org.itracker.model.util.UserUtilities;
28  import org.itracker.services.UserService;
29  import org.itracker.services.exceptions.AuthenticatorException;
30  import org.itracker.web.actions.base.ItrackerBaseAction;
31  import org.itracker.web.forms.LoginForm;
32  import org.itracker.web.util.Constants;
33  import org.itracker.web.util.LoginUtilities;
34  import org.itracker.web.util.ServletContextUtils;
35  import org.itracker.web.util.SessionManager;
36  
37  import javax.servlet.ServletException;
38  import javax.servlet.http.HttpServletRequest;
39  import javax.servlet.http.HttpServletResponse;
40  import java.io.IOException;
41  import java.lang.reflect.InvocationTargetException;
42  
43  public class LoginAction extends ItrackerBaseAction {
44      private static final Logger log = Logger.getLogger(LoginAction.class);
45  
46  
47      public ActionForward execute(ActionMapping mapping, ActionForm form,
48                                   HttpServletRequest request, HttpServletResponse response)
49              throws ServletException, IOException {
50  
51  
52  
53          log.debug("execute: called");
54  
55          String pageTitleKey = "itracker.web.login.title";
56          String pageTitleArg = "";
57          request.setAttribute("pageTitleKey", pageTitleKey);
58          request.setAttribute("pageTitleArg", pageTitleArg);
59  
60          saveErrors(request, new ActionMessages());
61          return mapping.getInputForward();
62  
63      }
64  
65  
66  }