1.一个普通的类
public class testAction1 { public String execute(){ return "success"; } }
2.实现Action接口
public class testAction2 implements Action { @Override public String execute() throws Exception { // TODO Auto-generated method stub return SUCCESS;//这个时候可以用SUCCESS,因为Action接口中有SUCCESS } }
3.继承ActionSupport类
public class testAction3 extends ActionSupport { public String execute() throws Exception{ return SUCCESS;//ActionSupport接口实现了Action类 } }