📄 user_005finfo_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class user_005finfo_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,
"", 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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("<html>\n");
out.write("<head>\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\n");
out.write("<title>查看用户信息</title>\n");
out.write("<style type=\"text/css\">\n");
out.write("<!--\n");
out.write(".style1 {\n");
out.write("\tfont-size: 24px;\n");
out.write("\tcolor: #FF0000;\n");
out.write("}\n");
out.write("body,td,th {\n");
out.write("\tcolor: #000000;\n");
out.write("}\n");
out.write("body {\n");
out.write("\tbackground-color: #FFFFCC;\n");
out.write("}\n");
out.write(".style2 {font-size: 12px}\n");
out.write("-->\n");
out.write("</style>\n");
out.write("</head>\n");
photo.DBConnection dbconn = null;
synchronized (_jspx_page_context) {
dbconn = (photo.DBConnection) _jspx_page_context.getAttribute("dbconn", PageContext.PAGE_SCOPE);
if (dbconn == null){
dbconn = new photo.DBConnection();
_jspx_page_context.setAttribute("dbconn", dbconn, PageContext.PAGE_SCOPE);
}
}
out.write("\n");
out.write("<body>\n");
out.write("<div align=\"center\">\n");
out.write(" <p>\n");
out.write(" ");
try{ int i=Integer.parseInt(request.getParameter("user_id")); Connection conn=dbconn.getConnection(); Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); String sql="select * from users where user_id="+i; ResultSet rs=stmt.executeQuery(sql); if(rs.next())
out.write("\n");
out.write(" <p> </p>\n");
out.write(" <span class=\"style1\">用户信息\n");
out.write("</span>\n");
out.write(" </div>\n");
out.write("<table width=\"403\" border=\"1\" align=\"center\">\n");
out.write(" <tr>\n");
out.write(" <td width=\"117\" bgcolor=\"#CCCCFF\">user_id</td>\n");
out.write(" <td width=\"270\">");
out.print(rs.getInt("user_id"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">user_name</td>\n");
out.write(" <td>");
out.print(rs.getString("user_name"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">name</td>\n");
out.write(" <td>");
out.print(rs.getString("name"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">sex</td>\n");
out.write(" <td>");
out.print(rs.getString("sex"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">age</td>\n");
out.write(" <td>");
out.print(rs.getString("age"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">tel</td>\n");
out.write(" <td>");
out.print(rs.getString("tel"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">address</td>\n");
out.write(" <td>");
out.print(rs.getString("address"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write(" <tr>\n");
out.write(" <td bgcolor=\"#CCCCFF\">email</td>\n");
out.write(" <td>");
out.print(rs.getString("email"));
out.write("</td>\n");
out.write(" </tr>\n");
out.write("</table>\n");
rs.close();stmt.close();conn.close(); } catch(Exception e){e.printStackTrace();}
out.write("\n");
out.write("<p align=\"center\"><a href=\"del_user.jsp\" class=\"style2\">返回</a>\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 + -