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

📄 index_0002ejsp_jsp.java

📁 点歌系统
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class index_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/index.jsp";from=(6,3);to=(6,21)]
         Connection conn; 
    // end
    // begin [file="/index.jsp";from=(7,3);to=(7,18)]
         ResultSet rs; 
    // end
    // begin [file="/index.jsp";from=(8,3);to=(8,20)]
         Statement stmt; 
    // end

    static {
    }
    public index_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=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="/index.jsp";from=(0,98);to=(6,0)]
                out.write("\r\n<html>\r\n<head>\r\n<title>singer</title>\r\n<script language=\"javascript\">\r\n</script>\r\n");

            // end
            // HTML // begin [file="/index.jsp";from=(6,23);to=(7,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/index.jsp";from=(7,20);to=(8,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/index.jsp";from=(8,22);to=(9,0)]
                out.write("\r\n");

            // end
            // begin [file="/index.jsp";from=(9,2);to=(26,0)]
                
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
                String currow=request.getParameter("currow") ;
                if (currow==null||Integer.parseInt(currow)==0) {
                     currow="1";
                }
                String[] s_name=new String[8];
                conn=DriverManager.getConnection("jdbc:odbc:song","","") ;
                stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE) ;
                rs=stmt.executeQuery("select sname,stype,chr,pname,scount from singer order by scount desc") ;
                if (rs.absolute(Integer.parseInt(currow))==true) {
                int i=0;
                do {
                  s_name[i]=rs.getString("sname");
                  i++;
                }while (rs.next() &&i<8);
                }
            // end
            // HTML // begin [file="/index.jsp";from=(26,2);to=(30,0)]
                out.write("\r\n</head>\r\n\r\n<body>\r\n");

            // end
            // begin [file="/index.jsp";from=(30,0);to=(30,43)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "head.jsp" + _jspx_qStr, out, true);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/index.jsp";from=(30,43);to=(32,0)]
                out.write("\r\n<table border=\"0\" width=\"80%\" align=\"center\">\r\n");

            // end
            // begin [file="/index.jsp";from=(32,2);to=(36,0)]
                
                if (rs.absolute(Integer.parseInt(currow))==true) {
                int i=0;
                do {
            // end
            // HTML // begin [file="/index.jsp";from=(36,2);to=(38,57)]
                out.write("\r\n<tr>\r\n<form name=\"frmdel\" method=\"post\" action=\"del.jsp?currow=");

            // end
            // begin [file="/index.jsp";from=(38,60);to=(38,71)]
                out.print(rs.getRow());
            // end
            // HTML // begin [file="/index.jsp";from=(38,73);to=(39,60)]
                out.write("\">\r\n<td width=\"15%\" align=\"center\"><input type=\"checkbox\" name=\"");

            // end
            // begin [file="/index.jsp";from=(39,63);to=(39,64)]
                out.print(i);
            // end
            // HTML // begin [file="/index.jsp";from=(39,66);to=(39,75)]
                out.write("\" value=\"");

            // end
            // begin [file="/index.jsp";from=(39,78);to=(39,87)]
                out.print(s_name[i]);
            // end
            // HTML // begin [file="/index.jsp";from=(39,89);to=(40,45)]
                out.write("\"></td>\r\n<td width=\"15%\" align=\"left\"><img src=\"photo/");

            // end
            // begin [file="/index.jsp";from=(40,48);to=(40,69)]
                out.print(rs.getString("pname"));
            // end
            // HTML // begin [file="/index.jsp";from=(40,71);to=(41,29)]
                out.write("\" width=\"30\" height=\"35\"></td>\r\n<td width=\"15%\" align=\"left\">");

            // end
            // begin [file="/index.jsp";from=(41,32);to=(41,53)]
                out.print(rs.getString("sname"));
            // end
            // HTML // begin [file="/index.jsp";from=(41,55);to=(42,29)]
                out.write("</td>\r\n<td width=\"15%\" align=\"left\">");

            // end
            // begin [file="/index.jsp";from=(42,32);to=(42,53)]
                out.print(rs.getString("stype"));
            // end
            // HTML // begin [file="/index.jsp";from=(42,55);to=(43,29)]
                out.write("</td>\r\n<td width=\"15%\" align=\"left\">");

            // end
            // begin [file="/index.jsp";from=(43,32);to=(43,51)]
                out.print(rs.getString("chr"));
            // end
            // HTML // begin [file="/index.jsp";from=(43,53);to=(44,29)]
                out.write("</td>\r\n<td width=\"15%\" align=\"left\">");

            // end
            // begin [file="/index.jsp";from=(44,32);to=(44,51)]
                out.print(rs.getInt("scount"));
            // end
            // HTML // begin [file="/index.jsp";from=(44,53);to=(46,0)]
                out.write("</td>\r\n</tr>\r\n");

            // end
            // begin [file="/index.jsp";from=(46,2);to=(50,0)]
                
                i++;
                }while (rs.next() &&i<8);
                }
            // end
            // HTML // begin [file="/index.jsp";from=(50,2);to=(56,57)]
                out.write("\r\n<tr>\r\n<td align=\"center\"><input type=\"submit\" value=\"删除\" name=\"delsubmit\"></td>\r\n<td align=\"center\"><input type=\"reset\" value=\"重选\" name=\"reset\"></td>\r\n<td align=\"center\"><input type=\"submit\" value=\"修改\" name=\"editsubmit\" ></td>\r\n</form>\r\n<form name=\"frmadd\" method=\"post\" action=\"new.jsp?currow=");

            // end
            // begin [file="/index.jsp";from=(56,60);to=(56,73)]
                out.print(rs.getRow()-8);
            // end
            // HTML // begin [file="/index.jsp";from=(56,75);to=(59,45)]
                out.write("\">\r\n<td align=\"center\"><input type=\"submit\" value=\"添加\" name=\"btnaddsubmit\"></td>\r\n</form>\r\n<td align=\"center\"><a href=\"index.jsp?currow=");

            // end
            // begin [file="/index.jsp";from=(59,48);to=(59,62)]
                out.print(rs.getRow()-16);
            // end
            // HTML // begin [file="/index.jsp";from=(59,64);to=(60,45)]
                out.write("\">上页</a></td>\r\n<td align=\"center\"><a href=\"index.jsp?currow=");

            // end
            // begin [file="/index.jsp";from=(60,48);to=(60,59)]
                out.print(rs.getRow());
            // end
            // HTML // begin [file="/index.jsp";from=(60,61);to=(63,0)]
                out.write("\">下页</a></td>\r\n</tr>\r\n</table>\r\n");

            // end
            // begin [file="/index.jsp";from=(63,2);to=(67,0)]
                
                  rs.close() ;
                  stmt.close() ;
                  conn.close() ;
            // end
            // HTML // begin [file="/index.jsp";from=(67,2);to=(68,0)]
                out.write("\r\n");

            // end
            // begin [file="/index.jsp";from=(68,0);to=(68,43)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "tail.jsp" + _jspx_qStr, out, true);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/index.jsp";from=(68,43);to=(71,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 + -