Struts2的一些默认值
struts.xml的配置文件中
1. action标签中method属性
- 默认值是execute
1. action标签中的class属性
- 在struts-default.xml中配置了<default-class-ref class="com.opensymphony.xwork2.ActionSupport" />
- com.opensymphony.xwork2.ActionSupport的类默认执行execute方法
public String execute() throws Exception {
return SUCCESS;
}
- execute方法中返回success
- result标签中的name属性
- 默认是success
result标签中的type属性
- dispatcher转发
手动添加配置
- “一个action的名字”>
- 如果找不到包下的action,会使用
一个action的名字
来作为默认的action请求