01: /**
02: *
03: */package com.opensymphony.webwork.dispatcher;
04:
05: import javax.servlet.http.HttpServletRequest;
06:
07: import com.opensymphony.webwork.ServletActionContext;
08: import com.opensymphony.xwork.ActionSupport;
09:
10: /**
11: * A simple action support class that sets properties to be able to serve
12: *
13: * @author amarch
14: *
15: */
16: public class DefaultActionSupport extends ActionSupport {
17:
18: String successResultValue;
19:
20: /**
21: *
22: */
23: public DefaultActionSupport() {
24: super ();
25: }
26:
27: /* (non-Javadoc)
28: * @see com.opensymphony.xwork.ActionSupport#execute()
29: */
30: public String execute() throws Exception {
31: HttpServletRequest request = ServletActionContext.getRequest();
32: String requestedUrl = request.getPathInfo();
33: if (successResultValue == null)
34: successResultValue = requestedUrl;
35: return SUCCESS;
36: }
37:
38: /**
39: * @return Returns the successResultValue.
40: */
41: public String getSuccessResultValue() {
42: return successResultValue;
43: }
44:
45: /**
46: * @param successResultValue The successResultValue to set.
47: */
48: public void setSuccessResultValue(String successResultValue) {
49: this.successResultValue = successResultValue;
50: }
51:
52: }
|