欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

利用Stripes写的一个简单Action

程序员文章站 2022-07-15 12:46:21
...
public class HelloActionBean implements ActionBean {
	ActionBeanContext context;

	public void setContext(ActionBeanContext context) {
		this.context = context;
	}

	public ActionBeanContext getContext() {
		return this.context;
	}

	String message;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@HandlesEvent("sayHello")
	public Resolution greeting() {
		// return new RedirectResolution("/greeting.jsp");
		return new ForwardResolution("/jsp/greeting.jsp");
	}
}