⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userregistersave_jsp.java

📁 一个银行数据中心网站
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import java.text.*;
import java.sql.*;
import com.am.*;

public final class userRegisterSave_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\n');
      out.write('\n');
      com.am.register register = null;
      synchronized (_jspx_page_context) {
        register = (com.am.register) _jspx_page_context.getAttribute("register", PageContext.PAGE_SCOPE);
        if (register == null){
          register = new com.am.register();
          _jspx_page_context.setAttribute("register", register, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      com.am.OpenDB dbconn = null;
      synchronized (application) {
        dbconn = (com.am.OpenDB) _jspx_page_context.getAttribute("dbconn", PageContext.APPLICATION_SCOPE);
        if (dbconn == null){
          dbconn = new com.am.OpenDB();
          _jspx_page_context.setAttribute("dbconn", dbconn, PageContext.APPLICATION_SCOPE);
        }
      }
      out.write("\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("\t<title>银行数据监控系统</title>\n");
      out.write("\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\n");
      out.write("</head>\n");
      out.write("<body>\n");
      out.write("\t<div align=\"center\">\n");
      out.write("\t<table width=\"60%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >\n");
      out.write("\n");
      out.write("\t   ");
 request.setCharacterEncoding("gb2312");		register.userName = request.getParameter("txtusername");	    register.setConnection(dbconn.getConnection());		if(register.isExist())		{		
      out.write("\n");
      out.write("\t\t\t<tr>\n");
      out.write("\t\t\t\t<td colspan=\"2\" align=\"center\">\n");
      out.write("\t\t\t\t<font color=\"red\"><b>该用户已经存在!</b></font>\n");
      out.write("\t\t\t\t<br><br>\n");
      out.write("\t\t\t\t<input type=button name=Goback value=\"返回\" onclick=\"javascript:window.history.go(-1)\">\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t</tr>\n");
      out.write("\n");
      out.write("\t\t");
}		else		{			register.userPassword = request.getParameter("txtuserPassword");			register.name =request.getParameter("txtname");			register.company =request.getParameter("txtcompany");			register.depart =request.getParameter("txtdepart");			register.email =request.getParameter("txtemail");			SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");			register.createDatetime =dateFormatter.format(new java.util.Date());			register.myfields="0";			String[] myfields=request.getParameterValues("txtmyfields");			if (myfields!=null)			{				for(int i=0;i<myfields.length;i++)				{					if(myfields[i]!="")					{						register.myfields =register.myfields +"," + myfields[i];					}				}			}			register.myfields=register.myfields+",0";			register.systemRole="1";			register.tag =0;			register.addUser();			if (register.getErrNum()==0)			{	
      out.write("\n");
      out.write("\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td colspan=\"2\" align=\"center\">\n");
      out.write("\t\t\t\t\t<font color=\"#0000FF\" size=\"5\">\n");
      out.write("\t\t\t\t\t<b>注册成功,您的注册信息如下:</b>\n");
      out.write("\t\t\t\t\t</font>\n");
      out.write("\t\t\t\t\t<br><br>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">用户名:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\">");
      out.print(register.userName);
      out.write("&nbsp;</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">密码:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\">");
      out.print(register.userPassword);
      out.write("&nbsp;</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">姓名:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\">");
      out.print(register.name);
      out.write(" &nbsp;</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">所在公司:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\" > ");
      out.print(register.company);
      out.write("&nbsp;</td>\n");
      out.write("\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">所属部门:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\">");
      out.print(register.depart);
      out.write("&nbsp;</td>\n");
      out.write("\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"right\">Email:</td>\n");
      out.write("\t\t\t\t\t<td width=\"50%\" align=\"left\">");
      out.print(register.email);
      out.write("&nbsp;</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\n");
      out.write("\t\t\t");
}                      else			{
      out.write("\n");
      out.write("\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td colspan=\"2\" align=\"center\">\n");
      out.write("\t\t\t\t\t<font color=\"red\"><b>注册失败,请重新注册!</b></font>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"center\" colspan=\"2\">\n");
      out.write("\t\t\t\t\t<br><br>\n");
      out.write("\t\t\t\t\t<input type=button name=Goback1 value=\"返回\" onclick=\"javascript:window.history.go(-1)\">\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\n");
      out.write("\t\t\t");
}		}
      out.write("\n");
      out.write("\n");
      out.write("\t</table>\n");
      out.write("\t</div>\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -