Home > front end >  Registration does not show not database table content is how to return a responsibility
Registration does not show not database table content is how to return a responsibility

Time:09-19

Why can log on but registration and display database tables are not to come out

Public void list (it request, HttpServletResponse response)
Throws ServletException, IOException {



The String key=request. The getParameter (" key ");
if (!" ". The equals (key) & amp; & The key!=null) {
Request. SetAttribute (" staffList ", staffService. Search (key));
}
The else {
Request. SetAttribute (" staffList ", staffService. Search (" "));
}
//store the request scope, jump to/ABC/staff/staff_list JSP page
Request. SetAttribute (" page ", PageContext getpages ());
Request. GetRequestDispatcher ("./ABC/staff/staff_list JSP "). The forward (
The request, response);
}



The JSP page
<% @ page language="Java" contentType="text/HTML. Charset=utf-8 "
PageEncoding="utf-8" % & gt;
<% @ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" % & gt; <%
String path=request. GetContextPath ();
String=basePath request. GetScheme () + "://" + request. GetServerName () + ":" + request. GetServerPort () + + "/" path;
%>


<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;
Add staff & lt;/title> <br/><script SRC="https://bbs.csdn.net/abc/js/jquery-1.9.1.min.js" & gt; </script> <br/><script SRC="https://bbs.csdn.net/abc/js/validate_form.js" & gt; </script> <br/><The script type="text/javascript" & gt; <br/>The function isUsername (STR) {<br/>Var boo=1; <br/>The jQuery ajax ({<br/>Type: "POST", <br/>Url: 'UserServlet' <br/>Cache: false, <br/>Async: false, <br/>Data: {<br/>Method: the "validate", <br/>Username: STR <br/>}, <br/>Success: the function (data) {<br/>Boo=data; <br/>} <br/>}); <br/>Return boo==0? true : false; <br/>} <br/></script> <br/><br/><The script type="text/javascript" & gt; <br/><br/>The function v_username (username) {<br/>If (isNull (username. Value)) {<br/>JQuery (" # validate_username "). The text (" * user name cannot be empty). The CSS (" color ", "red"); <br/>return false; <br/>} <br/>if (! IsUsername (username. Value)) {<br/>JQuery (" # validate_username "). The text (" * this user name has been registered "). The CSS (" color ", "red"); <br/>return false; <br/>} <br/>The else {<br/>JQuery (" # validate_username "). The text (this username available ") "). The CSS (" color ", "green"); <br/>} <br/>JQuery (" # validate_email "). The text (" "); <br/>return true; <br/>} <br/>The function v_password (password) {<br/>If (isNull (password. The value)) {<br/>JQuery (" # validate_password "). The text (" * password cannot be empty "); <br/>return false; <br/>} <br/>JQuery (" # validate_password "). The text (" "); <br/>return true; <br/>} <br/>The function v_confirm_password (confirm_password) {<br/>If ((jQuery (" # confirm_password "). Val ()! #=the jQuery (" password "). Val ())) {<br/>JQuery (" # validate_confirm_password "). The text (" * two do not match the password input "); <br/>return false; <br/>} <br/>JQuery (" # validate_confirm_password "). The text (" "); <br/>return true; <br/>} <br/>The function v_name (name) {<br/>If (isNull (name. The value)) {<br/>JQuery (" # validate_name "). The text (" * please enter the name "); <br/>return false; <br/>} <br/>JQuery (" # validate_name "). The text (" "); <br/>return true; <br/>} <br/></script> <br/><br/><The script type="text/javascript" & gt; <br/>The function validate_form (thisform) {<br/><br/>With (thisform) <br/><br/>{<br/><br/>If (<br/>(v_username (username)) <br/>& (v_password (password [0]) <br/>& (v_confirm_password (confirm_password)) <br/><br/>) <br/><br/>return true; <br/>The else <br/>return false; <br/>} <br/>} <br/></script> <br/><link rel="STYLESHEET" type="text/CSS" href="https://bbs.csdn.net/abc/codebase/dhtmlxcalendar.css" & gt; <br/><! -- <script SRC="https://bbs.csdn.net/topics/abc/codebase/dhtmlxcommon.js" & gt; </script> - & gt; <br/><script SRC="https://bbs.csdn.net/abc/codebase/dhtmlxcalendar.js" & gt; </script> <br/><script SRC="https://bbs.csdn.net/abc/js/jquery-1.9.1.min.js" language="javascript"/& gt; </script> <br/><script SRC="https://bbs.csdn.net/abc/js/js.js" language="javascript"/& gt; </script> <br/><script SRC="https://bbs.csdn.net/abc/ckeditor/ckeditor.js" & gt; </script> <br/><script> <br/>The function initCKEditor () {<br/>} <br/><br/>Var <br/>MCal, <br/>MDCal, <br/>NewStyleSheet; <br/>Var dateFrom=null; <br/>Var dateTo=null; <br/>Window. The onl oad=function () {<br/>InitCKEditor (); <br/>} <br/><br/></script> <br/><style type="text/CSS" & gt; <br/><! - <br/>Body {<br/>The font-family: Arial, Helvetica, sans-serif. <br/>font-size:12px; <br/>color:#666666; <br/>background:#fff; <br/>text-align:center; <br/><br/>} <br/><br/>* {<br/>margin:0; <br/>padding:0; <br/>} <br/><br/>A {<br/>Color: # 1 e7ace; <br/>text-decoration:none; <br/>} <br/><br/>A: hover {<br/>color:#000; <br/>text-decoration:underline; <br/>} <br/>H3 {<br/>font-size:14px; <br/>font-weight:bold; <br/>} <br/><br/>The pre, p {<br/>Color: # 1 e7ace; <br/>Margin: 4 px; <br/>} <br/>Input, select, textarea {<br/>Padding: 1 px; <br/>Margin: 2 px; <br/>font-size:12px; <br/>} <br/>nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/12712.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/12712.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/12711.html'>MyEclipse Preview gibberish</a></div> <div class="detail-arr-right">Next:<a href='/frontend/12713.html'>Abnormal myeclipse2017 own tomcat8.5 started</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=other' target='_blank'>other</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>