struts2 中 action 跟 actionsupport 的区别
来源:互联网 发布:vb浪涌保护器 编辑:程序博客网 时间:2024/05/02 01:10
当我们在写action的时候,可以实现action接口,也可以继承actionsupport这个类.到底这2个有什么区别呢...
action接口有:
public static final java.lang.String SUCCESS = "success";
public static final java.lang.String NONE = "none";
public static final java.lang.String ERROR = "error";
public static final java.lang.String INPUT = "input";
public static final java.lang.String LOGIN = "login";
public abstract java.lang.String execute() throws java.lang.Exception;
而actionsupport这个工具类在实现了action接口的基础上还定义了一个validate()方法,重写该方法,它会在execute()方法之前执行,如校验失败,统能将视图转入input处,必须在配置该Action时配置input属性。
另外,actionsupport还提供了一个getText(String key)方法还实现国际化,该方法从资源文件上获取国际化信息.
这样在自定义标签时可以定义一个变量为new actionsupport对象实现国际化。
- struts2 中 action 跟 actionsupport 的区别
- struts2 Action 跟 Actionsupport 的区别
- Action 跟 Actionsupport 的区别
- Action 跟 Actionsupport 的区别
- Struts2中Action和ActionSupport
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2中actionsupport的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- struts2 中 Actionsupport 的作用
- Struts Action 与ActionSupport的区别
- Struts Action 与ActionSupport的区别
- 构建省份城市级联
- 安装Nginx
- GetModuleFileName函数得到当前应用程序路径
- MoteLab 使用说明
- nginx安装与配置
- struts2 中 action 跟 actionsupport 的区别
- 关于DISCUZNT上GOOGLE ADSENSE代码
- 转:240多个jQuery插件
- Gentoo安装手记
- 飞鸽遇上即时通讯
- Linux下Makefile的automake生成全攻略
- config4j-src 1.0
- 我也开始写开博了
- Centos 下安装 JDK