📄 _0002fdefault_0002ejspdefault_jsp_0.java
字号:
// end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(3,3);to=(4,0)]
// end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(20,0);to=(20,64)]
// end
static {
}
public _0002fDefault_0002ejspDefault_jsp_0( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws JasperException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(0,32);to=(1,0)]
out.write("\r\n"); // end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(1,50);to=(3,0)]
out.write("\r\n\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(4,4);to=(9,0)]
String sLoginErr = "";
String sUserName="";
String sPassWord="";
// end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(9,4);to=(11,0)]
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(11,2);to=(20,0)]
out.write("\r\n<html>\r\n<head>\r\n<title>网上用户注册</title>\r\n<meta http-equiv=\"pragma\" content=\"no-cache\"/>\r\n<meta http-equiv=\"expires\" content=\"0\"/>\r\n<meta http-equiv=\"cache-control\" content=\"no-cache\"/>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(20,0);to=(20,64)]
jspreg.dbBean dBBean = null;
boolean _jspx_specialdBBean = false;
synchronized (request) {
dBBean= (jspreg.dbBean)
pageContext.getAttribute("dBBean",PageContext.REQUEST_SCOPE);
if ( dBBean == null ) {
_jspx_specialdBBean = true;
try {
dBBean = (jspreg.dbBean) Beans.instantiate(this.getClass().getClassLoader(), "jspreg.dbBean");
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"jspreg.dbBean");
}
pageContext.setAttribute("dBBean", dBBean, PageContext.REQUEST_SCOPE);
}
}
if(_jspx_specialdBBean == true) {
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(11,2);to=(20,0)]
out.write("\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(20,0);to=(20,64)]
}
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(21,14);to=(23,0)]
out.write("\r\n<body bgcolor=\"#CDCEDC\" text=\"#000000\" link=\"#000080\" vlink=\"#000080\" alink=\"#000080\">\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(23,2);to=(43,0)]
String method=request.getMethod().trim();
if(method.toLowerCase().equals("post")){
String formAction=(String)request.getParameter("FormAction");
if(formAction.equals("logout")){
session.removeAttribute("USERID");
session.removeAttribute("PASSWORD");
}else{
sUserName=(String)request.getParameter("Login");
sPassWord=(String)request.getParameter("Password");
dBBean.connect();
if(!dBBean.checkLogin(sUserName,sPassWord))
sLoginErr="对不起您输入的用户名或密码有误!";
else{
session.setAttribute("USERID",sUserName);
session.setAttribute("PASSWORD",sPassWord);
}
dBBean.close();
}
}
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(43,2);to=(45,0)]
out.write("\r\n\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(45,0);to=(45,45)]
{
String _jspx_qStr = "";
pageContext.include("Header.jsp" + _jspx_qStr);
}
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(45,45);to=(53,9)]
out.write("\r\n <table>\r\n <tr>\r\n <td valign=\"top\">\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#BCBC7A\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" border=1>\r\n <tr>\r\n <td align=\"center\" bgcolor=\"#666633\" colspan=\"2\"><font style=\"font-size: 12pt; color: #FFFFFF; font-family: Arial, Tahoma, Verdana, Helvetica; font-weight: bold\">登录</font></td>\r\n </tr>\r\n "); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(53,11);to=(53,38)]
if (!sLoginErr.equals("")){
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(53,40);to=(55,138)]
out.write("\r\n <tr>\r\n <td colspan=2 bgcolor=#DDDDBD><font style=font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\">"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(55,141);to=(55,150)]
out.print(sLoginErr);
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(55,152);to=(57,9)]
out.write("</font></td>\r\n </tr>\r\n "); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(57,11);to=(57,12)]
}
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(57,14);to=(59,9)]
out.write("\r\n <form action=\"Default.jsp\" method=\"POST\">\r\n "); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(59,11);to=(59,111)]
if(session.getAttribute("USERID") == null || ((String) session.getAttribute("USERID")).equals("")) {
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(59,113);to=(61,222)]
out.write("\r\n <tr>\r\n <td bgcolor=\"#BCBC7A\"><font style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\">用户名</font></td><td bgcolor=\"#DDDDBD\"><input type=\"text\" name=\"Login\" maxlength=\"50\" value=\""); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(61,225);to=(61,242)]
out.print(toHTML(sUserName));
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(61,244);to=(69,9)]
out.write("\"></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor=\"#BCBC7A\"><font style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\">口令</font></td><td bgcolor=\"#DDDDBD\"><input type=\"password\" name=\"Password\" maxlength=\"50\"></td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\"><input type=\"hidden\" name=\"FormAction\" value=\"login\"><input type=\"submit\" value=\"Login\">\r\n </tr>\r\n "); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(69,11);to=(71,9)]
}else {
sUserName=(String)session.getAttribute("USERID");
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(71,11);to=(73,131)]
out.write("\r\n <tr>\r\n <td bgcolor=\"#DDDDBD\"><font style=\"font-size: 10pt; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica\">"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(73,134);to=(73,143)]
out.print(sUserName);
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(73,145);to=(75,9)]
out.write(" </font><input type=\"hidden\" name=\"FormAction\" value=\"logout\"/><input type=\"submit\" value=\"Logout\"/></td>\r\n </tr>\r\n "); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(75,11);to=(75,12)]
}
// end
// HTML // begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Default.jsp";from=(75,14);to=(89,0)]
out.write("\r\n </form>\r\n\r\n\r\n admin/admin<br>\r\n guest/guest</b>\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n<center><font face=\"Arial\"><small>这是一个使用JSP开发的网上用户注册的应用程序</small></font></center>\r\n</body>\r\n</html>\r\n\r\n"); // end
} catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clearBuffer();
pageContext.handlePageException(ex);
} finally {
out.flush();
_jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -