第一种方法:
1,前台是传对象的各个属性,可以全放在一个form里面
2,使用这个form来调用action,利用struts.xml进行控制
3,后台action里面,全部将所得到的属性使用private String ***;然后使用getter与setter方式获取前台的属性
4,这时候,你可以对这些属性进行封装,从而成为user的这个对象第二种方法就是使用json传送数据到后台,我之前写了个demo,链接如下:
http://download.csdn.net/detail/ganshenml/6971413
希望对你有所帮助!
1,前台是传对象的各个属性,可以全放在一个form里面
2,使用这个form来调用action,利用struts.xml进行控制
3,后台action里面,全部将所得到的属性使用private String ***;然后使用getter与setter方式获取前台的属性
4,这时候,你可以对这些属性进行封装,从而成为user的这个对象第二种方法就是使用json传送数据到后台,我之前写了个demo,链接如下:
http://download.csdn.net/detail/ganshenml/6971413
希望对你有所帮助!
解决方案 »
- hibernate 存入数据库当前时间求助
- Hibernate+jotm+jta+sql server+Tomcat事务不提交问题
- Unable to initialize TldLocationsCache: null
- 正则表达式验证IP带奄码,应该如何写呀.
- 求助:如何显示数据库的记录
- 如何把JSP也面中获取的参数写进数据库表中
- FEN
- 如何获得优酷视频里面的“播放次数”
- 是高手才进来.一个难题目
- java调用https的webservice接口
- 球介绍足球博彩网站架构!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- java,小型网络爬虫的问题!请大家指点!。
<input type="text" name="user.userName" size="26" id="user.userName">
<input type="password" name="user.password" size="26" id="user.password">