标签:
package com.pb.web.action; /* * 创建普通的java类 */ public class HelloAction1 { public String execute(){ return "success"; } }
package com.pb.web.action; import com.opensymphony.xwork2.Action; /* * 第二种实现Action接口 */ public class HelloAction2 implements Action { @Override public String execute() throws Exception { // TODO Auto-generated method stub return "success"; } }
package com.pb.web.action; import com.opensymphony.xwork2.ActionSupport; /* * 第三种 继承 ActionSupport类它是Action的实现类 */ public class HelloAction3 extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; @Override public String execute() throws Exception { // TODO Auto-generated method stub return "success"; } }
标签:
原文地址:http://www.cnblogs.com/liunanjava/p/4374627.html