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

📄 beansconstants.java

📁 一个注册系统的源代码
💻 JAVA
字号:
package signup;

import java.io.*;
import java.util.Properties;
import javax.servlet.http.*;

/**
 *
 * 本程序为帮助初学者了解Jsp/javabean 不建议商业用途 进一步使用请参考Struts框架
 *
 * J道版权所有 
 * J道(http://www.jdon.com) Java的解决之道。
 *
 */

public class BeansConstants {

  public static final String title = toChinese("用户注册"); //题目
  public static final String dbdriver = "org.gjt.mm.mysql.Driver"; //数据库JDBC驱动程序名称
  public static String dburl =
      "jdbc:mysql://localhost/personal?user=banq&password=225034ba"; //数据库连接URL

  public static String webmastermail = "banq@163.com"; //管理者信箱

  public static final String userid = "userid"; //用户ID
  public static final String passwd = "passwd"; //用户密码

  public static final String separator = File.separator; //文件分隔符
  public static final String dateformat = "yyyy年MM月dd日"; //日期类型
  public static final String timeformat = "yyyy年MM月dd日 hh时mm分ss秒"; //时间格式
  public static final String entimeformat = "yyyy.MM.dd hh:mm:ss"; //时间格式

  public static boolean debug = false;

  public static int DefaultPageSize = 15; //默认单页消息数

  //错误参数号
  public static final int OK = 0; //状态名
  public static final int PARAM_ERROR = 1; //参数错误

  public static final int NONESELECTED = 34; //未选中任何一项

  public static final int SQL_ERROR = 51; //数据库错误
  public static final int PASS_ERROR = 52; //密码或用户名错误
  public static final int DRIVER_ERROR = 53; //数据库引擎错误

  public static final int HTTPREQUEST_ERROR = 81; //HTTPREQUEST
  public static final int HTTPSESSION_ERROR = 86; //HTTPSESSION

  public static final int USERID_EXISTS = 120; //用户存在
  public static final int CONFIRM_ERROR = 121; //密码检查错误
  public static final int FORM_ERROR = 122; //没有填写
  public static final int IDCARD_ERROR = 123; //身份证检查错误
  public static final int EMAIL_ERROR = 125;
  public static final int IO_ERROR = 201; //读写错误
  public static final int UNEXPECTED = -1; //未知错误

  public static final String[] countrys = {
      "请选...", "上海", "北京", "广东", "广西", "海南", "福建", "天津", "湖南", "湖北", "河南", "河北",
      "山东", "山西", "黑龙江", "辽宁", "甘肃", "青海", "新疆", "西藏", "宁夏", "四川", "云南", "吉林",
      "内蒙古", "陕西", "安徽", "贵州", "江苏", "重庆", "浙江", "江西", "香港", "台湾", "美国", "加拿大",
      "北欧", "西欧", "东欧", "其他"};
  public static final String[] educations = {
      "请选...", "高中以下程度", "高中/中专", "大学/专科", "大学以上"};
  public static final String[] occupations = {
      "请选...", "教育/研究", "艺术/设计", "法律相关行业", "行政管理", "传播/媒体", "顾问/分析员", "服务/后勤",
      "工程师", "金融/财会", "政府机关/团体", "人力资源及训练", "管理阶层", "业务/广告", "项目/产品经理", "退休",
      "营销/中介", "秘书/行政助理", "自由职业", "学生", "其他行业"};
  public static final String[] certificatetypes = {
      "请选...", "身份证", "护照", "军人证"};
  public static final String[] passwdtypes = {
      "请选...", "你的身份证号最后四位数", "你的出生地", "你母亲的姓", "你最爱的人的生日"};

  private static boolean load = false;

  public BeansConstants() {

  }

  public static BeansConstants bc = new BeansConstants();
  public static BeansConstants getInstance() {
    //	     	if (!load) load();

    return bc;
  }

  public static String toChinese(String strvalue) {
    try {
      if (strvalue == null)
        return null;
      else {
        strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
        return strvalue;
      }
    }
    catch (Exception e) {
      return null;
    }
  }

}

⌨️ 快捷键说明

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