1.重写execute方法
package com.zchen.struts.action;
public class RegisterAction {
public String execute() {
return null;
}
}
2.继承Action接口
package com.zchen.struts.action;
import com.opensymphony.xwork2.Action;
public class RegisterAction implements Action{
public String execute() {
return null;
}
}
3.继承ActionSupport类
package com.zchen.struts.action;
import com.opensymphony.xwork2.ActionSupport;
public class RegisterAction extends ActionSupport{
private static final long serialVersionUID = -5708073463877873904L;
public String execute() {
return null;
}
}