1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.struts.webapp.example;
24
25
26 import org.apache.struts.action.ActionMapping;
27
28
29 /**
30 * Implementation of <strong>ActionMapping</strong> for the Struts
31 * example application. It defines the following custom properties:
32 * <ul>
33 * <li><b>failure</b> - The context-relative URI to which this request
34 * should be forwarded if a validation error occurs on the input
35 * information (typically goes back to the input form).
36 * <li><b>success</b> - The context-relative URI to which this request
37 * should be forwarded if the requested action is successfully
38 * completed.
39 * </ul>
40 *
41 * @author Craig R. McClanahan
42 * @version $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
43 */
44
45 public final class ApplicationMapping extends ActionMapping {
46
47
48
49
50
51 /**
52 * The failure URI for this mapping.
53 */
54 private String failure = null;
55
56
57 /**
58 * The success URI for this mapping.
59 */
60 private String success = null;
61
62
63
64
65
66 /**
67 * Return the failure URI for this mapping.
68 */
69 public String getFailure() {
70
71 return (this.failure);
72
73 }
74
75
76 /**
77 * Set the failure URI for this mapping.
78 *
79 * @param failure The failure URI for this mapping
80 */
81 public void setFailure(String failure) {
82
83 this.failure = failure;
84
85 }
86
87
88 /**
89 * Return the success URI for this mapping.
90 */
91 public String getSuccess() {
92
93 return (this.success);
94
95 }
96
97
98 /**
99 * Set the success URI for this mapping.
100 *
101 * @param success The success URI for this mapping
102 */
103 public void setSuccess(String success) {
104
105 this.success = success;
106
107 }
108
109
110 }