请给出一个SpringMVC的表单提交的例子和session运用的例子

2.表单提交和session 

像学servlet那时一样,继hello world的例子以后,紧接着我们就要学习表单提交和session。

例2.1


<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
    <title>form test</title>
</head>
<body>
<%=session.getAttribute("firstN") %>
<FORM ACTION="formHan.do" METHOD="POST">
姓名:
<INPUT TYPE="TEXT" NAME="firstName"><BR>
<INPUT TYPE="SUBMIT" VALUE="Submit">
</CENTER>
</FORM>
</body>
</html>
版权保护,原文出处:http://www.mark-to-win.com/index.html?content=Frame/frameUrl.html&chapter=Frame/SpringMVC_web.html#SpringMVCsession

猜你喜欢

转载自blog.csdn.net/mark_to_win/article/details/88695452
今日推荐