上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: 1 . type = "redirect" atguigu : 为 namespace 命名空间 testAction.do : 为 action 请求 阅读全文
posted @ 2017-08-01 21:12 beibidewomen 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1. struts2可以受理的请求的扩展名 是通过配置文件的方式决定的,默认配置为: 2. 打开配置文件,找到: struts.action.extension 默认请求的后缀为: action 或 空 ,如: hello.action 或 hello 3. 自定义后缀配置方法:在struts.xm 阅读全文
posted @ 2017-08-01 21:06 beibidewomen 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.ActionSupport是默认的Action类,若某个action节点没有配置class属性,则ActionSupport即为待执行的Action类 2.在手工完成字段验证,显示错误消息,国际化等情况下,推荐继承ActionSupport 3.result是action节点的子节点,resul 阅读全文
posted @ 2017-08-01 21:03 beibidewomen 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1. type="redirectAction" 2. 编写规则在: 3.guides 4. result types 5. redirect action result 6.例子 阅读全文
posted @ 2017-08-01 21:01 beibidewomen 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 1. 获取方式如下: 阅读全文
posted @ 2017-08-01 19:20 beibidewomen 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1 . 获取方法如下: 阅读全文
posted @ 2017-08-01 19:15 beibidewomen 阅读(795) 评论(0) 推荐(0) 编辑
摘要: 1.编写Action类继承相应的接口: 四个接口的方法会被struts2框架自动调用。 这样就可以获取到四个对象了,并调用对象中相应的方法 阅读全文
posted @ 2017-08-01 09:17 beibidewomen 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1. ActionContext actionContext = ActionContext.getContext(); 该对象可以获取到web上的所有信息 2. 获取application Map<String,Object> applicationMap = actionContext.getA 阅读全文
posted @ 2017-07-31 21:10 beibidewomen 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 方法1 : 运行结果如下: 方法2: 运行结果如下: 阅读全文
posted @ 2017-07-31 16:25 beibidewomen 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1. static静态代码块 2.{} 3.构造方法 4. 子类main方法运行时: static静态代码块 5.子类构造方法调用时: static静态代码块 {} 构造方法 6.子类new两次对象 父类: 子类: 7.运行结果如下: 阅读全文
posted @ 2017-07-30 18:47 beibidewomen 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页