📄 _0002fregistration_0002ejspregistration_jsp_0.java
字号:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import org.apache.jasper.runtime.*;
import java.beans.*;
import org.apache.jasper.JasperException;
public class _0002fRegistration_0002ejspRegistration_jsp_0 extends HttpJspBase {
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Common.jsp";from=(0,3);to=(170,0)]
//
// Filename: Common.jsp
// Generated with CodeCharge v.1.2.0
// JSP.ccp build 05/21/01
//
static final String CRLF = "\r\n";
static final int UNDEFINT=Integer.MIN_VALUE;
static final int adText = 1;
static final int adDate = 2;
static final int adNumber = 3;
static final int adSearch_ = 4;
static final int ad_Search_ = 5;
static final String appPath ="/";
String toHTML(String value) {
if ( value == null ) return "";
value = replace(value, "&", "&");
value = replace(value, "<", "<");
value = replace(value, ">", ">");
value = replace(value, "\"", "&" + "quot;");
return value;
}
private String replace(String str, String pattern, String replace) {
if (replace == null) {
replace = "";
}
int s = 0, e = 0;
StringBuffer result = new StringBuffer((int) str.length()*2);
while ((e = str.indexOf(pattern, s)) >= 0) {
result.append(str.substring(s, e));
result.append(replace);
s = e + pattern.length();
}
result.append(str.substring(s));
return result.toString();
}
boolean isNumber (String param) {
boolean result;
if ( param == null || param.equals("")) return true;
param=param.replace('d','_').replace('f','_');
try {
Double dbl = new Double(param);
result = true;
}
catch (NumberFormatException nfe) {
result = false;
}
return result;
}
boolean isEmpty (int val){
return val==UNDEFINT;
}
boolean isEmpty (String val){
return (val==null || val.equals("")||val.equals(Integer.toString(UNDEFINT)));
}
String toWhereSQL(String fieldName, String fieldVal, int type) {
String res = "";
switch(type) {
case adText:
if (! "".equals(fieldVal)) {
res = " " + fieldName + " like '%" + fieldVal + "%'";
}
case adNumber:
res = " " + fieldName + " = " + fieldVal + " ";
case adDate:
res = " " + fieldName + " = '" + fieldVal + "' ";
default:
res = " " + fieldName + " = '" + fieldVal + "' ";
}
return res;
}
String toSQL(String value, int type) {
if ( value == null ) return "Null";
String param = value;
if ("".equals(param) && (type == adText || type == adDate) ) {
return "Null";
}
switch (type) {
case adText: {
param = replace(param, "'", "''");
param = replace(param, "&", "&");
param = "'" + param + "'";
break;
}
case adSearch_:
case ad_Search_: {
param = replace(param, "'", "''");
break;
}
case adNumber: {
try {
if (! isNumber(value) || "".equals(param)) param="null";
else param = value;
}
catch (NumberFormatException nfe) {
param = "null";
}
break;
}
case adDate: {
param = "'" + param + "'";
break;
}
}
return param;
}
String getOptions( java.sql.ResultSet rs,boolean isSearch, boolean isRequired, String selectedValue ) {
String sOptions = "";
String sSel = "";
if ( isSearch ) {
sOptions += "<option value=\"\">All</option>";
}
else {
if ( ! isRequired ) {
sOptions += "<option value=\"\"></option>";
}
}
try {
while (rs.next() ) {
String id = toHTML( rs.getString(1) );
String val = rs.getString(2);
val=toHTML(val);
if ( id.compareTo(selectedValue) == 0 ) {
sSel = "SELECTED";
}
else {
sSel = "";
}
sOptions += "<option value=\""+id+"\" "+sSel+">"+val+"</option>";
}
rs.close();
}
catch (Exception e) {}
return sOptions;
}
String getParam(javax.servlet.http.HttpServletRequest req, String paramName) {
String param = req.getParameter(paramName);
if ( param == null || param.equals("") ) return "";
param = replace(param,"&","&");
param = replace(param,"<","<");
param = replace(param,">",">");
param = replace(param,"&lt;","<");
param = replace(param,"&gt;",">");
return param;
}
// end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Registration.jsp";from=(1,53);to=(2,0)]
// end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Registration.jsp";from=(32,0);to=(32,64)]
// end
static {
}
public _0002fRegistration_0002ejspRegistration_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\\Registration.jsp";from=(0,32);to=(1,0)]
out.write("\r\n"); // end
// begin [file="D:\\JbuilderProgram\\JspReg\\RegApp\\Registration.jsp";from=(2,4);to=(21,0)]
String flduser_login="";
String flduser_password="";
String flduser_password2="";
String fldname="";
String fldemail="";
String fldaddress="";
String fldcity="";
String fldstate_id="";
String fldzip="";
String fldage="";
String fldgender="";
String fldeducation="";
String fldincome="";
String fldnotes="";
String flduser_id="";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -