spring 管理action如何获得提交的表单????在线等待~~
------解决方案--------------------------------------------------------
还是提交到action呀
不知道你什么意思
------解决方案--------------------------------------------------------
提交时写个js 提交到 某个类比如User.action(mvc中),然后在domain中有个user.java这个类中声明你需要提交的东西,写好get和set方法,然后在User.action中的方法中加载这个类user u=f.addpo(user.class);这样你提交指向这个方法,这个u就能得到提交的内容了,比如u.getCar();
不知我说明白了么?
------解决方案--------------------------------------------------------
那你知道 mvc dao service impl 这几个你见过么?不知道的话,不好讲了
------解决方案--------------------------------------------------------
不论是否使用spring,struts的Action中获取表单不都是一样的吗?
JSP
- HTML code
<form action="XXX.do" method="post"> <input type="text" name="user.username"> <input type="text" name="truename"> <input type="submit"></form>