?? __reg.java
字號:
/* compiled from JSP: /reg.jsp
*
* This code was automatically generated at 14:23:15 on 2004-3-2
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*/
package jsp_servlet;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
// User imports
// built-in init parameters:
// boolean _verbose -- wants debugging
// Well-known variables:
// JspWriter out -- to write to the browser
// HttpServletRequest request -- the request object.
// HttpServletResponse response -- the response object.
// PageContext pageContext -- the page context for this JSP
// HttpSession session -- the session object for the client (if any)
// ServletContext application -- The servlet (application) context
// ServletConfig config -- The ServletConfig for this JSP
// Object page -- the instance of this page's implementation class (i.e., 'this')
/**
* This code was automatically generated at 14:23:15 on 2004-3-2
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __reg
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
// StaleIndicator interface public boolean _isStale() { weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext()); java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/reg.jsp", 1046050544000L, "7.0.1.0")) return true; return false; } public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) { java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/reg.jsp", 1046050544000L, "7.0.1.0")) return true; return false; }
public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
{
// declare and set well-known variables:
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.ServletContext application = config.getServletContext();
javax.servlet.jsp.tagext.Tag _activeTag = null;
// variables for Tag extension protocol
Object page = this;
javax.servlet.jsp.JspWriter out;
javax.servlet.jsp.PageContext pageContext = javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
response.setHeader("Content-Type", "text/html; charset=gb2312"); out = pageContext.getOut(); JspWriter _originalOut = out;
javax.servlet.http.HttpSession session = request.getSession(true);
try { // error page try block response.setContentType("text/html; charset=gb2312"); out.print("\r\n\r\n"); org.pan.web.usermn user = null; //[ /reg.jsp; Line: 3] user = (org.pan.web.usermn)pageContext.getAttribute("user"); //[ /reg.jsp; Line: 3] if (user == null) { // begin 'user' instantiation block... //[ /reg.jsp; Line: 3] { // Don't need to synchronize on page scope //[ /reg.jsp; Line: 3] user = (org.pan.web.usermn)pageContext.getAttribute("user"); //[ /reg.jsp; Line: 3] if (user == null) { // begin 'user' synchronized instantiation block... //[ /reg.jsp; Line: 3] user = new org.pan.web.usermn(); //[ /reg.jsp; Line: 3] pageContext.setAttribute("user", user); //[ /reg.jsp; Line: 3] } // end synchronized bean instantiation block... //[ /reg.jsp; Line: 3] } // end synchronized bean scope block... //[ /reg.jsp; Line: 3] } // end bean instantiation block... //[ /reg.jsp; Line: 3] out.print("\r\n"); //[ /reg.jsp; Line: 4] String mesg = ""; //[ /reg.jsp; Line: 5] String submit = request.getParameter("Submit"); //[ /reg.jsp; Line: 6] if (submit!=null && !submit.equals("")) { //[ /reg.jsp; Line: 7] if(user.insert(request)){ //[ /reg.jsp; Line: 8] session.setAttribute("username",user.getUserName()); //[ /reg.jsp; Line: 9] session.setAttribute( "userid", Long.toString( user.getUserid() ) ); //[ /reg.jsp; Line: 10] response.sendRedirect("userinfo.jsp?action=regok"); //[ /reg.jsp; Line: 11] } else if (!user.getMessage().equals("")) { //[ /reg.jsp; Line: 12] mesg = user.getMessage(); //[ /reg.jsp; Line: 13] } else //[ /reg.jsp; Line: 14] mesg = "注冊時出現錯誤,請稍后再試"; //[ /reg.jsp; Line: 15] } //[ /reg.jsp; Line: 16] //[ /reg.jsp; Line: 17] //[ /reg.jsp; Line: 18] out.print("\r\n\r\n<html>\r\n<head>\r\n<title>好易多網絡電子書店--用戶注冊</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<script language=\"javascript\">\r\n\r\nfunction openScript(url,name, width, height){\r\n\tvar Win = window.open(url,name,\'width=\' + width + \',height=\' + height + \',resizable=1,scrollbars=yes,menubar=no,status=yes\' );\r\n}\r\n\r\nfunction checkform() {\r\n\tif (document.form1.username.value==\"\"){\r\n\t\talert(\"用戶名不能為空\");\r\n\t\tdocument.form1.username.focus();\r\n\t\treturn false;\r\n\t}\r\n\tif (document.form1.passwd.value==\"\"){\r\n\t\talert(\"用戶密碼不能為空\");\r\n\t\tdocument.form1.passwd.focus();\r\n\t\treturn false;\r\n\t}\r\n\tif (document.form1.passwd.value!=document.form1.passconfirm.value){\r\n\t\talert(\"確認密碼不相符!\");\r\n\t\tdocument.form1.passconfirm.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn true;\r\n}\r\n\r\n</script>\r\n<link rel=\"stylesheet\" href=\"books.css\" type=\"text/css\">\r\n</head>\r\n\r\n<body bgcolor=\"#FFCC99\" text=\"#000000\">\r\n<div align=\"center\">\r\n <table width=\"750\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr> \r\n <td width=\"120\" align=\"ce"); out.print("nter\"><img src=\"images/Img20625.jpg\" width=\"50\" height=\"50\"><br>\r\n <font color=\"#0066CC\">好易多書店</font></td>\r\n <td align=\"center\"><img src=\"images/baners2.gif\" width=\"468\" height=\"60\"></td>\r\n <td align=\"center\" width=\"80\"><a href=\"#\">本站公告</a><br>\r\n <br>\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <table width=\"750\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr> \r\n <td width=\"200\"> </td>\r\n <td width=\"55\"><a href=\"index.jsp\">首頁</a></td>\r\n <td width=\"100\"><a href=\"booklist.jsp\">在線購物</a></td>\r\n <td width=\"100\"><a href=\"shoperlist.jsp\">我的購物車</a></td>\r\n <td width=\"100\"><a href=\"userinfo.jsp\">用戶信息</a></td>\r\n <td> </td>\r\n </tr>\r\n </table>\r\n <p>您好,好易多電子書店感謝您的支持</p>\r\n <form name=\"form1\" method=\"post\" action=\"\">\r\n "); if (!mesg.equals("")) out.println("<p><font color=#ff0000>"+ mesg + "</font></p>"); //[ /reg.jsp; Line: 80] //[ /reg.jsp; Line: 80] out.print("\r\n <table width=\"450\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr> \r\n <td colspan=\"2\" align=\"center\"><b><font color=\"#0000FF\">用戶注冊</font></b></td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">用戶名:</td>\r\n <td width=\"272\"> \r\n <input type=\"text\" name=\"username\" maxlength=\"20\" size=\"14\" >\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">密碼:</td>\r\n <td width=\"272\">\r\n <input type=\"password\" name=\"passwd\" maxlength=\"20\" size=\"14\">\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">確認密碼:</td>\r\n <td width=\"272\">\r\n <input type=\"password\" name=\"passconfirm\" maxlength=\"20\" size=\"14\">\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">真實姓名:</td>\r\n <td width=\"272\">\r\n <input type=\"text\" name=\"names\" maxlength=\"20\" size=\"14\">\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">性別:</td>\r\n <td width=\"2"); out.print("72\">\r\n <select name=\"sex\">\r\n <option>男</option>\r\n <option>女</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">聯系地址:</td>\r\n <td width=\"272\">\r\n <input type=\"text\" name=\"address\" maxlength=\"150\" size=\"40\">\r\n </td>\r\n </tr>\r\n\t <tr> \r\n <td width=\"171\" align=\"right\">聯系郵編:</td>\r\n <td width=\"272\">\r\n <input type=\"text\" name=\"post\" maxlength=\"8\" size=\"8\">\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">聯系電話:</td>\r\n <td width=\"272\">\r\n <input type=\"text\" name=\"phone\" maxlength=\"25\" size=\"16\">\r\n </td>\r\n </tr>\r\n <tr> \r\n <td width=\"171\" align=\"right\">電子郵件:</td>\r\n <td width=\"272\">\r\n <input type=\"text\" name=\"email\" maxlength=\"50\" size=\"25\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td width=\"171\" align=\"right\"> </td>\r\n <td width=\"272\">\r\n <input type=\"submit\" name=\"Submit"); out.print("\" value=\"注冊\" onclick=\"javascript:return(checkform());\">\r\n <input type=\"reset\" name=\"reset\" value=\"取消\">\r\n </td>\r\n </tr>\r\n </table> \r\n </form>\r\n <p> </p><table width=\"70%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\r\n <tr>\r\n <td align=\"center\">多智能網絡有限公司開發<br>\r\n CopyRight@2003 <br>\r\n Email:<a href=\"mailto:pz990@163.net\">pz990@163.net</a></td>\r\n </tr>\r\n </table>\r\n \r\n</div>\r\n</body>\r\n</html>\r\n"); user.close(); //關閉數據庫連接 //[ /reg.jsp; Line: 162] //[ /reg.jsp; Line: 162] } catch (Throwable __ee) { while (out != null && out != _originalOut) out = pageContext.popBody(); ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee); }
//before final close brace...
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -