_1_jsp.java
来自「手机在线系统 采用Java 中的J2ME, JSP 跟MySql 运行环」· Java 代码 · 共 125 行
JAVA
125 行
package org.apache.jsp.login;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.j2me.data.*;
public final class _1_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("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<HTML>\r\n");
out.write("\r\n");
out.write("<HEAD>\r\n");
out.write("\r\n");
out.write("<TITLE> New Document </TITLE>\r\n");
out.write("\r\n");
out.write("</HEAD>\r\n");
out.write("\r\n");
out.write("<BODY>\r\n");
/**
* @(#)register.jsp 1.11 01/08/23
* Copyright (c) 2004-2005 wuhua of workroom Inc. All Rights Reserved.
* @version 1.0, 10/05/2004
* @author 饶荣庆
* @author 余煜辉
*/
/*这个文件的一点点问题。
*问题是,由于JSP的中文支持不是很好。得到的参数,与读取数据库时他们采用的编码方式不同,
*虽然输入的中文一样,但是结果却是乱的, 所以判断时结果也不一样,所以一律采用英文方式登陆
*/
/*此文件用于获得手机客户端发送用户名,用户密码,用户邮箱,用户电话并判断它们是否合法*/
User user= null; //数据库类
/* String userName = request.getParameter("name"); //获得用户名
String eMail = request.getParameter("eMail");
String phone = request.getParameter("phone");
String userPassword = request.getParameter("password"); //获得用户密码
*/
String w = "饶饶能够";
byte[] ubyte = w.getBytes("ISO8859_1"); //把获得的参数用统一的编码方式,这样利于判断
w = new String(ubyte);
try
{
user = new User();
user.connect(); //连接数据库
out.println(w);
user.registerUser(w, "fsdf", "dfsdf","dfsd");
out.println("chenggong");
}
catch(ClassNotFoundException e)
{
out.println("Load ");
}
catch(SQLException sqlexception)
{
out.println("jhj");
}
catch(Exception e)
{
out.println("ghgh");
}
user.disconnect();
out.write("\r\n");
out.write("\r\n");
out.write("</BODY>\r\n");
out.write("</HTML>\r\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 + =
减小字号Ctrl + -
显示快捷键?