diff options
Diffstat (limited to 'sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes')
2 files changed, 42 insertions, 0 deletions
diff --git a/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java b/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java new file mode 100644 index 0000000000..901e3ff1b8 --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java @@ -0,0 +1,15 @@ +package mystripes.action; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; + +public class BaseActionBean implements ActionBean { + private ActionBeanContext context; + + public ActionBeanContext getContext() { + return context; + } + public void setContext(ActionBeanContext context) { + this.context = context; + } +} diff --git a/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java b/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java new file mode 100644 index 0000000000..acbe5456ea --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java @@ -0,0 +1,27 @@ +package mystripes.action; + +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; +import net.sourceforge.stripes.action.UrlBinding; + +import org.oasisopen.sca.annotation.Reference; + +import sample.HelloworldService; + +@UrlBinding("/Home.htm") +public class HomeActionBean extends BaseActionBean { + + @Reference + HelloworldService service; + + @DefaultHandler + public Resolution view() { + return new ForwardResolution("/WEB-INF/jsp/home.jsp"); + } + + public String getHello() { + return service.sayHello("world"); + } + +} |