摘要: struts2_接收参数有三种方法,属性驱动,模型驱动,域模型。 1、属性驱动 action中,声明属性user和age,并且一定要写setter()和getter()方法。使用时,直接使用user和age就可以。 package com.bjsxt.struts2.user.action; imp 阅读全文
posted @ 2017-04-12 16:18 半缘修道半缘(君) 阅读(134) 评论(0) 推荐(0) 编辑
摘要: struts2_action的调用方法,通过struts.xml配置和调用的路径配合,有三种, 一、struts.xml配置文件中,action标签中写上method=“add”,调用时只需找到这个action即可调用该action的add()方法、 二、struts.xml配置文件中,action 阅读全文
posted @ 2017-04-12 09:41 半缘修道半缘(君) 阅读(176) 评论(0) 推荐(0) 编辑