request获取前台表单

<form action="<%=basePath%>/login.do" method="post">
<ul>

<li>姓 名:<input type="text" name="account" /> </li>

<li>密 码:<input type="text" name="password" /> </li>

<li><input type="submit" value="确认" /> </li>

</ul>

</form>

 

Map<String, String[]> form = request.getParameterMap();

System.out.println(form .get("account")[0]);

System.out.println(form .get("password")[0]);

posted @ 2015-10-23 09:45  王八一瓶子  阅读(375)  评论(0编辑  收藏  举报