📄 i_0002ejsp_jsp.java
字号:
import java.sql.*;
import java.util.Date;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class i_0002ejsp_jsp extends HttpJspBase {
static {
}
public i_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
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;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/i.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/i.jsp";from=(1,30);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/i.jsp";from=(2,35);to=(3,0)]
out.write("\r\n");
// end
// begin [file="/i.jsp";from=(3,2);to=(26,0)]
//第一步:获取login.htm页面表单体叫过来的元素值
String stryhm, strmm;
stryhm = request.getParameter("username");
strmm = request.getParameter("pasw");
//第二步:加载驱动
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException e){
System.out.println(e.getMessage());
}
//第三步:架桥,并执行SQL
String sql = "select * from xgxx where yhm='"+stryhm+"' and mm='"+strmm+"'";
try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cnCon = DriverManager.getConnection("jdbc:odbc:login"," "," ");
Statement stmt = cnCon.createStatement();
ResultSet rs = stmt.executeQuery(sql);
if(!rs.next()){
response.sendRedirect("error.jsp");
}
}catch(SQLException e){
System.out.println(e.getMessage());
}
// end
// HTML // begin [file="/i.jsp";from=(26,2);to=(48,0)]
out.write("\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n\"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>主页面</title>\r\n\r\n<style type=\"text/css\">\r\n<!--\r\n.style2 {font-size: large}\r\n.style3 {\r\n\tfont-family: \"华文行楷\";\r\n\tfont-size: 18px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"Layer1\" style=\"position:absolute; left:212px; top:115px; width:26px; height:500px; z-index:1\"><img src=\"../image/index/bg_line2.gif\" width=\"3\" height=\"500\"></div>\r\n<div id=\"Layer2\" style=\"position:absolute; left:250px; top:114px; width:619px; height:500px; z-index:2\">\r\n\r\n");
// end
// begin [file="/i.jsp";from=(48,2);to=(77,0)]
String a1="",b1="",c1="",d1="",e1="",f1="",g1="",h1="",z1="",j1="",k1="",l1="",m1="",n1="",o1="",p1="",q1="",r1="",s1="";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cnCon = DriverManager.getConnection("jdbc:odbc:login"," "," ");
Statement stmt = cnCon.createStatement();
ResultSet rs = stmt.executeQuery("select * from xgxx ");
while(rs.next()){
int i=1;
a1=rs.getString(i++);
b1=rs.getString(i++);
c1=rs.getString(i++);
d1=rs.getString(i++);
e1=rs.getString(i++);
f1=rs.getString(i++);
g1=rs.getString(i++);
h1=rs.getString(i++);
z1=rs.getString(i++);
j1=rs.getString(i++);
k1=rs.getString(i++);
l1=rs.getString(i++);
m1=rs.getString(i++);
n1=rs.getString(i++);
o1=rs.getString(i++);
p1=rs.getString(i++);
q1=rs.getString(i++);
r1=rs.getString(i++);
s1=rs.getString(i++);
// end
// HTML // begin [file="/i.jsp";from=(77,2);to=(85,55)]
out.write("\r\n\r\n<table width=\"619\" height=\"437\" border=\"0\">\r\n <tr bgcolor=\"#FF9900\">\r\n <td height=\"20\" colspan=\"4\"><span class=\"style3\">个人信息</span></td>\r\n </tr>\r\n <tr bgcolor=\"#99CCFF\">\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">姓名:</span></td>\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">");
// end
// begin [file="/i.jsp";from=(85,58);to=(85,60)]
out.print(a1);
// end
// HTML // begin [file="/i.jsp";from=(85,62);to=(87,55)]
out.write("</span></td>\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">登录密码:</span></td>\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">");
// end
// begin [file="/i.jsp";from=(87,58);to=(87,60)]
out.print(b1);
// end
// HTML // begin [file="/i.jsp";from=(87,62);to=(91,55)]
out.write("</span></td>\r\n </tr>\r\n <tr bgcolor=\"#99CCFF\">\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">性别:</span></td>\r\n <td width=\"150\" height=\"20\"><span class=\"style2\">");
// end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -