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