1 package test.web;2 3 /**4 * Simple WebWork action.5 *6 * <p>WebWork is a web application framework for J2EE. It is based on a concept called "Pull HMVC"7 * Pull Hierarchical Model View Controller). It supports an arrange of view technologies - XSLT, JSP,8 * Velocity, Applet, Jasper Reports, and more.</p>9 *10 * <p>Actions are central to WebWork (WW) as they are the controllers in your application. For more11 * information, check the <a HREF="http://www.opensymphony.com/webwork/">WebWork Documentation</a>.12 *13 * @webwork.action14 * name="foo"15 * views="a=tjo.jsp,b=blah.jsp,c=duh.jsp"16 *17 * @webwork.action18 * name="bar"19 * views="qwe=tjo.jsp,rty=blah.jsp,xyz=duh.jsp"20 *21 * @webwork.action22 * name="xyzzy"23 * error="blah.jsp"24 * input="duh.jsp"25 * success="tjo.jsp"26 *27 * @webwork.action28 * name="myaction"29 * error="blah.jsp"30 * input="duh.jsp"31 * success="tjo.jsp"32 * views="login=login.jsp"33 *34 * @author <a HREF="mailto:youremail@yourdomain.com">youremail@yourdomain.com</a>35 */36 public class SimpleAction implements webwork.action.Action {37 /**38 * This method is where the logic of the action is executed. Parameters are passed39 * by calling set-methods, or by implementing the ParameterAware interface.40 */41 public String execute() {42 // Simple. Very simple.43 return SUCCESS;44 }45 46 /**47 * @webwork.command48 * error="add_error.jsp"49 * name="add"50 * success="add_success.jsp"51 */52 public String doCmd1() {53 return SUCCESS;54 }55 56 /**57 * @webwork.command58 * error="cmd2_error.jsp"59 * success="cmd2_success.jsp"60 */61 public String doCmd2() {62 return SUCCESS;63 }64 }