接收参数一般是用一个对象进行封装
例如使用Person对象进行封装,那么,要提供他的setPerson()和getPerson方法()。
在表单中提交,使用的语句为:
<form action="<%=request.getContextPath()%>/control/department/action2" method="post">
用户名:<input type="text" name="person.name"><br/>
用户Id: <input type="text" name="person.id"><br/>
<input type="submit" value="提交">
</form>
在Jsp页面中,要得到person的数据,则使用el表达式:${person.name},${person.id}