2015年7月17日

Struts-接收表单的值

摘要: 接收表单的值:乱码问题: A:属性设值的方式 (1):简单:在Action设置属性,生成SET与GET方法。 参数的名称与属性的名称一致。 (2):Action中设置Bean的属性 Bean必须生成SET、GET方法。Bean不可以实例化。 Bean中必须要有一个默认的空参数的... 阅读全文

posted @ 2015-07-17 21:53 Arvin-9 阅读(197) 评论(0) 推荐(0)

Struts-Action的类型

摘要: Action的类型:A:普通的类B:实现Action接口C:继承ActionSupport,使用继承,可以使用父类的方法。Action中其它方法的定义: 调用save方法调用list方法调用update方法调用delete方法调用方法_Dispatch的方式//前提:常... 阅读全文

posted @ 2015-07-17 16:52 Arvin-9 阅读(228) 评论(0) 推荐(0)

struts.xml的配置

摘要: 1:bean,定义类。2:constant:struts中的常量定义。文件目录/org/apache/struts2/default.propertiesdefault.properties定义了struts2中所有的常量。struts并不会去读取。struts.i18n.encoding=UTF-... 阅读全文

posted @ 2015-07-17 12:00 Arvin-9 阅读(132) 评论(0) 推荐(0)

Struts2-在action中获取表单提交的参数

摘要: 1、表单 /FirstAction" method="post"> 2、action代码package com.action;import javax.servlet.http.HttpServletRequest;import org.apache.st... 阅读全文

posted @ 2015-07-17 11:19 Arvin-9 阅读(178) 评论(0) 推荐(0)

导航