在action中:
public class ActionTest extends ActionSupport(){
private Service service;
private String name;
private String sex;
public String execute() throws Exception {
return SUCCESS;
}
public String add() throws Exception {
return "add";
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
}
和
public class ActionTest extends ActionSupport(){
private Service service;
private String name;
private String sex;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String add() throws Exception {
return "add";
}
public String execute() throws Exception {
return SUCCESS;
}
}
为什么都调用execute方法时 页面响应的时间会相差1秒多?和代码顺序有直接关系?求大神指点