JSP之表单提交得到和邮政的详解及实例
一得到和邮政的区别
二实战(帖子方式提交)
1、login.jsp
“% @”页面语言=“Java”导入=“Java”。乌提尔。*“ContentType=”文本/html;charset=utf-8 " % % String path=request。GetContextPath();字符串基本路径=请求。getscheme()' ://'请求。getservername()“:”请求。getserverport()“路径”/;% !DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN ' HTML head base href=' %=base path % ' rel=' external no follow ' rel=' external no follow ' title my JSP '登录。“JSP”起始页/title meta http-equiv=' pragma ' content=' no-cache ' meta http-equiv=' cache-control ' content=' no-cache ' meta http-equiv=' expires ' content=' 0 ' meta http-equiv='-link rel='样式表type=' text/CSS ' href=' style。CSS ' rel='外部nofollow ' rel='外部nofollow '-/头体h1用户登录/h1小时表单操作='多洛金。JSP ' name=' loginFOrm '方法=' post '表tr TD用户名:/TD TD输入类型=' text '名称=' username '/TD/tr TD密码:/TD TD TD输入类型=' password ' name=' password '/TD/tr TD colspan=' 2 '输入类型=' submit ' value='登录/td /tr /table /form /body/html2、dologin.jsp
“% @”页面语言=“Java”导入=“Java”。乌提尔。*“ContentType=”文本/html;charset=utf-8 " % % String path=request。GetContextPath();字符串基本路径=请求。getscheme()' ://'请求。getservername()“:”请求。getserverport()“路径”/;% !DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN ' HTML head base href=' %=base path % ' rel=' external no follow ' rel=' external no follow ' title my JSP ' dolo gin。“JSP”起始页/title meta http-equiv=' pragma ' content=' no-cache ' meta http-equiv=' cache-control ' content=' no-cache ' meta http-equiv=' expires ' content=' 0 ' meta http-equiv='-link rel='样式表type=' text/CSS ' href=' style。CSS ' rel='外部nofollow ' rel='外部nofollow '-/头体h1登录成功/h1 hr /body/html三运行结果
如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!