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

📄 note1_0002ejsp_jsp.java

📁 基于J2EE的个人数字助理系统,大家参考下,提出宝贵意见
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class note1_0002ejsp_jsp extends HttpJspBase {


    static {
    }
    public note1_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="/note1.jsp";from=(0,48);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/note1.jsp";from=(1,30);to=(2,0)]
                out.write("\r\n");

            // end
            // begin [file="/note1.jsp";from=(2,2);to=(20,0)]
                
                        String strname;
                        strname = request.getParameter("name");
                    try{
                		Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                	        }catch(ClassNotFoundException e){
                		       System.out.println(e.getMessage());
                	}
                        String sql = "select * from booknote where name='"+strname+"'";
                	try{
                                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                		Connection cnCon = DriverManager.getConnection("jdbc:odbc:login"," "," ");
                		Statement stmt = cnCon.createStatement();
                		ResultSet rs = stmt.executeQuery(sql);
                            }catch(SQLException e){
                		System.out.println(e.getMessage());
                	}
                session.setAttribute("strname",strname);
            // end
            // HTML // begin [file="/note1.jsp";from=(20,2);to=(28,0)]
                out.write("\r\n<html>\r\n<head>\r\n<title>\r\n通讯录\r\n</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n");

            // end
            // begin [file="/note1.jsp";from=(28,2);to=(41,0)]
                
                       String a1="",b1="",c1="",d1="";
                       try{
                                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                		Connection cnCon = DriverManager.getConnection("jdbc:odbc:login"," "," ");
                		Statement stmt = cnCon.createStatement();
                		ResultSet rs = stmt.executeQuery("select * from booknote where name='"+strname+"'");
                		while(rs.next()){
                		int i=1;
                	a1=rs.getString(i++);
                	b1=rs.getString(i++);
                	c1=rs.getString(i++);
                	d1=rs.getString(i++);
            // end
            // HTML // begin [file="/note1.jsp";from=(41,2);to=(51,40)]
                out.write("\r\n     \r\n <table width=\"626\" border=\"0\" align=\"center\">\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=\"112\"><div align=\"center\" class=\"style7 style2 style11 style19\">\r\n            <div align=\"center\">姓&nbsp;&nbsp;&nbsp;&nbsp;名</div>\r\n        </div></td>\r\n            <td width=\"112\" height=\"20\">");

            // end
            // begin [file="/note1.jsp";from=(51,43);to=(51,45)]
                out.print(a1);
            // end
            // HTML // begin [file="/note1.jsp";from=(51,47);to=(55,41)]
                out.write("</td>\r\n        <td width=\"113\"><div align=\"center\" class=\"style5 style2 style11 style19\">\r\n          <div align=\"center\">联系电话</div>\r\n        </div></td>\r\n             <td width=\"113\" height=\"20\">");

            // end
            // begin [file="/note1.jsp";from=(55,44);to=(55,46)]
                out.print(b1);
            // end
            // HTML // begin [file="/note1.jsp";from=(55,48);to=(59,37)]
                out.write("</td>\r\n        <td width=\"113\"><div align=\"center\" class=\"style5 style2 style11 style19\">\r\n          <div align=\"center\">E-mail</div>\r\n        </div></td>\r\n         <td width=\"113\" height=\"20\">");

            // end
            // begin [file="/note1.jsp";from=(59,40);to=(59,42)]
                out.print(c1);
            // end
            // HTML // begin [file="/note1.jsp";from=(59,44);to=(61,37)]
                out.write("</td>\r\n        <td width=\"114\" height=\"20\"><div align=\"center\" >地&nbsp;&nbsp;&nbsp;&nbsp;址</div></td>\r\n         <td width=\"114\" height=\"20\">");

            // end
            // begin [file="/note1.jsp";from=(61,40);to=(61,42)]
                out.print(d1);
            // end
            // HTML // begin [file="/note1.jsp";from=(61,44);to=(87,0)]
                out.write("</td>\r\n        <td width=\"122\"><div align=\"center\" class=\"style7 style2 style11 style19\">\r\n          <div align=\"center\">操作</div>\r\n        </div></td>\r\n      </tr>\r\n\t  <tr bgcolor=\"#99CCFF\">\r\n\t    <td height=\"21\" colspan=\"4\">&nbsp;</td>\r\n\t    <td><div align=\"center\" class=\"style5\">\r\n          <a href=\"inb.html\">新增\t    </a></div></td>\r\n      </tr>\r\n\t  <tr bgcolor=\"#99CCFF\">\r\n\t    <td><div align=\"center\" class=\"style7 style2\">\r\n            <div align=\"center\"><span class=\"style11\"><span class=\"style13\"><span class=\"style17\"><span class=\"style18\"><span class=\"style18\"><span class=\"style19\"></span></span></span></span></span></span></div>\r\n        </div></td>\r\n\t    <td width=\"113\"><div align=\"center\" class=\"style5 style2 style9\">\r\n          <div align=\"center\"><span class=\"style11\"><span class=\"style13\"><span class=\"style17\"><span class=\"style18\"><span class=\"style18\"><span class=\"style19\"></span></span></span></span></span></span></div>\r\n        </div></td>\r\n        <td width=\"113\"><div align=\"center\" class=\"style5 style2 style9\">\r\n          <div align=\"center\"><span class=\"style11\"><span class=\"style13\"><span class=\"style17\"><span class=\"style18\"><span class=\"style18\"><span class=\"style19\"></span></span></span></span></span></span></div>\r\n        </div></td>\r\n        <td width=\"114\">&nbsp;</td>\r\n        <td width=\"122\"><div align=\"center\" class=\"style7 style2 style11 style19\">\r\n<a href=\"note4.jsp\">修改 </a>|\r\n          <a href=\"del.html\">删除</a>        </div></td>\r\n      </tr>\r\n</table>\r\n");

            // end
            // begin [file="/note1.jsp";from=(87,2);to=(93,0)]
                
                         }
                	}catch(SQLException ex1)
                		{
                		System.out.println(ex1.getMessage());
                		}
            // end
            // HTML // begin [file="/note1.jsp";from=(93,2);to=(96,0)]
                out.write("\r\n</body>\r\n</html>\r\n");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

⌨️ 快捷键说明

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