1 /*
2 * Copyright (c) 2001 - 2005 ivata limited.
3 * All rights reserved.
4 * -----------------------------------------------------------------------------
5 * ivata masks may be redistributed under the GNU General Public
6 * License as published by the Free Software Foundation;
7 * version 2 of the License.
8 *
9 * These programs are free software; you can redistribute them and/or
10 * modify them under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; version 2 of the License.
12 *
13 * These programs are distributed in the hope that they will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * See the GNU General Public License in the file LICENSE.txt for more
18 * details.
19 *
20 * If you would like a copy of the GNU General Public License write to
21 *
22 * Free Software Foundation, Inc.
23 * 59 Temple Place - Suite 330
24 * Boston, MA 02111-1307, USA.
25 *
26 *
27 * To arrange commercial support and licensing, contact ivata at
28 * http://www.ivata.com/contact.jsp
29 * -----------------------------------------------------------------------------
30 * $Log: SuccessAction.java,v $
31 * Revision 1.1 2005/04/11 12:22:40 colinmacleod
32 * Moved success action from demo subproject
33 * to web subproject.
34 *
35 * Revision 1.3 2005/01/07 09:13:04 colinmacleod
36 * Added newline to end of file.
37 *
38 * Revision 1.2 2005/01/07 08:08:19 colinmacleod
39 * Moved up a version number.
40 * Changed copyright notices to 2005.
41 * Updated the documentation:
42 * - started working on multiproject:site docu.
43 * - changed the logo.
44 * Added checkstyle and fixed LOADS of style issues.
45 * Added separate thirdparty subproject.
46 * Added struts (in web), util and webgui (in webtheme) from ivata op.
47 *
48 * Revision 1.1.1.1 2004/05/16 20:40:07 colinmacleod
49 * Ready for 0.1 release
50 *
51 * Revision 1.1.1.1 2004/05/09 14:42:04 colin
52 * First version in CVS
53 * -----------------------------------------------------------------------------
54 */
55 package com.ivata.mask.web.struts;
56 import javax.servlet.http.HttpServletRequest;
57 import javax.servlet.http.HttpServletResponse;
58 import org.apache.struts.action.Action;
59 import org.apache.struts.action.ActionForm;
60 import org.apache.struts.action.ActionForward;
61 import org.apache.struts.action.ActionMapping;
62 /***
63 * <p>
64 * Simple action to always return successfully.
65 * </p>
66 *
67 * @since ivata masks 0.4 (2004-04-30)
68 * @author Colin MacLeod
69 * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
70 * @version $Revision: 1.1 $
71 */
72 public final class SuccessAction extends Action {
73 /***
74 * <p>
75 * Generic method called by the <strong>Struts </strong> interface. Always
76 * returns success. .
77 * </p>
78 *
79 * @param mapping The ActionMapping used to select this instance
80 * @param form The ActionForm bean for this request (if any)
81 * @param request The non-HTTP request we are processing
82 * @param response The non-HTTP response we are creating
83 * @return this method returns a <code>"success"</code>
84 * <code>ActionForward</code>
85 * every time.
86 * @throws Exception if the application business logic throws an exception
87 */
88 public ActionForward execute(final ActionMapping mapping,
89 final ActionForm form,
90 final HttpServletRequest request,
91 final HttpServletResponse response)
92 throws Exception {
93 return mapping.findForward("success");
94 }
95 }
96