1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package examples.multibox;
23
24 import javax.servlet.http.HttpServletRequest;
25 import javax.servlet.http.HttpServletResponse;
26
27 import org.apache.struts.action.Action;
28 import org.apache.struts.action.ActionForm;
29 import org.apache.struts.action.ActionForward;
30 import org.apache.struts.action.ActionMapping;
31
32 /**
33 * Retrieve and process data from the submitted form
34 *
35 * @version $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
36 */
37 public class ProcessMultiboxAction extends Action {
38
39
40
41 /**
42 * Constructor for ProcessOptionsAction.
43 */
44 public ProcessMultiboxAction() {
45 super();
46 }
47
48
49
50 /**
51 * Process the request and return an <code>ActionForward</code> instance
52 * describing where and how control should be forwarded, or
53 * <code>null</code>if the response has already been completed.
54 *
55 * @param mapping The ActionMapping used to select this instance
56 * @param form The optional ActionForm bean for this request (if any)
57 * @param request The HTTP request we are processing
58 * @param response The HTTP response we are creating
59 *
60 * @exception Exception if the application logic throws an exception
61 *
62 * @return the ActionForward for the next view
63 */
64 public ActionForward execute(
65 ActionMapping mapping,
66 ActionForm form,
67 HttpServletRequest request,
68 HttpServletResponse response)
69 throws Exception {
70
71
72
73 if (isCancelled(request)) {
74 return mapping.findForward("home");
75 }
76
77
78 return mapping.findForward("success");
79 }
80
81 }