Struts2
yufeng.he
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Struts2---Action
一、Action的定义1、Action定义的三种方式:(1)普通的一个类,其中必须要有一个方法:public String execute() throws Exception{}(2)实现Action接口,覆盖其中的execute()方法;(3)继承ActionSupport类,覆盖execute()方法;ActionSupport中定义了几个字符串常量;注意:表单的属性原创 2016-08-29 20:43:09 · 431 阅读 · 0 评论 -
Struts2的多个文件上传和下载
1、新建一个web工程,导入struts2上传文件所需jar包;2、在web.xml文件中配置拦截器和欢迎页面;web.xml文件内容如下: Struts2_Action struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter原创 2016-08-30 00:37:03 · 400 阅读 · 0 评论 -
struts2 --- 输入验证Validation
1、输入验证分类客户端验证:长使用javascript对验证字段进行验证;服务端验证:使用java代码对验证字段进行后台验证;2、客户端验证(1)手动验证使用javascript脚本进行验证;============================== javascript =======================function validate()原创 2016-08-31 21:44:03 · 277 阅读 · 0 评论 -
Struts2的值栈-OGNL
1、Struts2的值栈1)使用EL的 ${productName}读取的productName值, 实际上该值不在request等域对象中,而是从值栈中获取的。2)ValueStack:I. 可以从ActionContext中获取值栈对象。II.值栈分为两个逻辑部分:> Map栈:实际上是OgnlContext类型,是个Map,也是对ActionContext的一个引原创 2016-09-25 11:30:20 · 250 阅读 · 0 评论 -
Params 拦截器、ModelDrivenInterceptor拦截器 和 PrepareInterceptor拦截器
Params 拦截器、ModelDrivenInterceptor拦截器 和 PrepareInterceptor拦截器、paramsPrepareParamsStack 拦截器栈后的运行流程1、Action需要实现的接口ModelDrivenInterceptor拦截器 ----- ModelDriven接口;PrepareInterceptor拦截器 ----- Pre原创 2016-10-13 01:38:46 · 375 阅读 · 0 评论
分享