JSP&Servlet编程要求:1. 完成其中中关于用户注册、用户登录、登陆成功的功能实现。包括各页面的实现,在

2020-05-03 教育 100阅读
网上这类的东西很多,
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ page import="java.util.*" %>



登录页面</title><br /></head><br /><body><br /> <form name="loginForm" method="post" action="judgeUser.jsp"><br /> <table><br /> <tr><br /> <td>用户名:<input type="text" name="userName" id="userName"></td><br /> </tr><br /> <tr><br /> <td>密码:<input type="password" name="password" id="password"></td><br /> </tr><br /> <tr><br /> <td><input type="submit" value="登录" style="background-color:pink"> <input type="reset" value="重置" style="background-color:red"></td> <br /> </tr><br /> </table><br /> </form><br /></body><br /></html><br /><%@ page language="java" contentType="text/html; charset=GB18030"<br /> pageEncoding="GB18030"%><br /><%@ page import="java.util.*" %><br /><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br /><html><br /><head><br /> <title>身份验证</title><br /></head><br /><body><br /> <%<br /> request.setCharacterEncoding("GB18030");<br /> String name = request.getParameter("userName");<br /> String password = request.getParameter("password");<br /> if(name.equals("abc")&& password.equals("123")) {<br /> <br /> %><br /> <jsp:forward page="afterLogin.jsp"><br /> <jsp:param name="userName" value="<%=name%>"/><br /> </jsp:forward><br /> <%<br /> }<br /> else {<br /> %><br /> <jsp:forward page="login.jsp"/><br /> <%<br /> }<br /> %><br /></body><br /></html> <br /><%@ page language="java" contentType="text/html; charset=GB18030"<br /> pageEncoding="GB18030"%><br /><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br /><html><br /><head><br /> <title>登录成功</title><br /></head><br /><body><br /> <%<br /> request.setCharacterEncoding("GB18030");<br /> String name = request.getParameter("userName");<br /> out.println("欢迎你:" + name);<br /> %><br /></body><br /></html> <br />总共3个jsp文件,第一个是login.jsp,第2个是judge.jsp,第3个是afterLogin.jsp </div> <div class="tags"> </div> <div class="clear"> <div class="shares"> <b>声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com</b> <div id="share" class="share-component social-share" data-sites="weibo,qzone,qq,wechat"> </div> </div> <div class="act"> <a href="JavaScript:" onclick="zan('251440391')" class="zan" title="赞"> <i class="iconfont bx bx-like"></i> <span id="zan">0</span> </a> </div> </div> <div class="clear"></div> </div> <div class="ny-ad"> </div> <div class="ny-ad"> </div> <div class="like"> <h3 class="title">最新文章</h3> <div class="piclist likep"> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/1053127440656025659.html" title="您好,在百度看到您说泉州华侨大学的心理医生赵冰洁老师很厉害,您有她的联系方式吗?"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/2" class="cat">教育 </a> <h3> <a href="https://w.sf024.com/info/1053127440656025659.html" title="您好,在百度看到您说泉州华侨大学的心理医生赵冰洁老师很厉害,您有她的联系方式吗?">您好,在百度看到您说泉州华侨大学的心理医生赵冰洁老师很厉害,您有她的联系方式吗?</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 197阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/2076495649652543908.html" title="报考浙大的研究生需要什么条件"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/2" class="cat">教育 </a> <h3> <a href="https://w.sf024.com/info/2076495649652543908.html" title="报考浙大的研究生需要什么条件">报考浙大的研究生需要什么条件</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 238阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/397952023654509085.html" title="西安理工大学机械与精密仪器工程学院考研保护第一志愿么"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/2" class="cat">教育 </a> <h3> <a href="https://w.sf024.com/info/397952023654509085.html" title="西安理工大学机械与精密仪器工程学院考研保护第一志愿么">西安理工大学机械与精密仪器工程学院考研保护第一志愿么</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 446阅读 </span> </div> </div> <div class="clear"></div> </div> </div> <div class="ny-ad"> </div> </div> <div class="sidebar"> <div class="widget postlist"> <h3>猜你喜欢</h3> <ul class="hasimg"> <li> <a href="https://w.sf024.com/info/251440391.html" title="JSP&Servlet编程要求:1. 完成其中中关于用户注册、用户登录、登陆成功的功能实现。包括各页面的实现,在" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="JSP&Servlet编程要求:1. 完成其中中关于用户注册、用户登录、登陆成功的功能实现。包括各页面的实现,在"> </a> <a href="https://w.sf024.com/info/251440391.html" target="">JSP&Servlet编程要求:...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-03 </span><span> <i class="iconfont bx bx-show"></i> 100阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/276134676.html" title="c语言程序设计编程题目:请 :编写完成对学生相关信息的要求:1.定义一个结构体类型student,其中包括三个成" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="c语言程序设计编程题目:请 :编写完成对学生相关信息的要求:1.定义一个结构体类型student,其中包括三个成"> </a> <a href="https://w.sf024.com/info/276134676.html" target="">c语言程序设计编程题目:请 :编...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 10-25 </span><span> <i class="iconfont bx bx-show"></i> 312阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/402525117.html" title="点击jsp页面的按钮通过servlet跳转到另一个jsp页面" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="点击jsp页面的按钮通过servlet跳转到另一个jsp页面"> </a> <a href="https://w.sf024.com/info/402525117.html" target="">点击jsp页面的按钮通过serv...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 10-02 </span><span> <i class="iconfont bx bx-show"></i> 100阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/518390090539793125.html" title="求网络聊天室源码,用JSP或Servlet都行" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="求网络聊天室源码,用JSP或Servlet都行"> </a> <a href="https://w.sf024.com/info/518390090539793125.html" target="">求网络聊天室源码,用JSP或Se...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-23 </span><span> <i class="iconfont bx bx-show"></i> 71阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1382561191835617220.html" title="在servlet中如何取得JSP中多个input值?" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="在servlet中如何取得JSP中多个input值?"> </a> <a href="https://w.sf024.com/info/1382561191835617220.html" target="">在servlet中如何取得JSP...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-01 </span><span> <i class="iconfont bx bx-show"></i> 194阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/300799129.html" title="JSP传递的参数中有特殊字符,servlet中接收不全" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="JSP传递的参数中有特殊字符,servlet中接收不全"> </a> <a href="https://w.sf024.com/info/300799129.html" target="">JSP传递的参数中有特殊字符,s...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 08-28 </span><span> <i class="iconfont bx bx-show"></i> 41阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/160779354.html" title="JSP传递的参数中有特殊字符,servlet中接收不全" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="JSP传递的参数中有特殊字符,servlet中接收不全"> </a> <a href="https://w.sf024.com/info/160779354.html" target="">JSP传递的参数中有特殊字符,s...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 06-28 </span><span> <i class="iconfont bx bx-show"></i> 68阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/572815467.html" title="jsp+javabean+servlet实现登录功能user.java用来干什么?" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="jsp+javabean+servlet实现登录功能user.java用来干什么?"> </a> <a href="https://w.sf024.com/info/572815467.html" target="">jsp+javabean+ser...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 03-19 </span><span> <i class="iconfont bx bx-show"></i> 81阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/552594636.html" title="jsp在文本框里输入中文提交到servlet,显示的是乱码。怎么办,求高手帮忙" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="jsp在文本框里输入中文提交到servlet,显示的是乱码。怎么办,求高手帮忙"> </a> <a href="https://w.sf024.com/info/552594636.html" target="">jsp在文本框里输入中文提交到s...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 07-27 </span><span> <i class="iconfont bx bx-show"></i> 48阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/407943162.html" title="传统的javaweb开发(jsp+servlet+javabean)与SSH框架各有什么样的优缺点,希望能够做一个对比" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="传统的javaweb开发(jsp+servlet+javabean)与SSH框架各有什么样的优缺点,希望能够做一个对比"> </a> <a href="https://w.sf024.com/info/407943162.html" target="">传统的javaweb开发(jsp...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-26 </span><span> <i class="iconfont bx bx-show"></i> 121阅读 </span> </p> </li> </ul> </div> </div> </div> </section> <footer class="footer"> <div class="container"> <p class="copyright">COPYRIGHT 2013 - 2024 你问我答网®. ALL RIGHTS RESERVED. | <a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备2020035127号</a></p> </div> </footer> <script> let search_type="1"; var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?752ceaa2e03e39366ceff9a414a1f6a7"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();</script> <script type="text/javascript" src="https://w.sf024.com/assets/js/jquery.share.min.js"></script> </body> </html>