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

📄 del_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 del_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/del.jsp";from=(12,3);to=(12,34)]
         String[] s_name=new String[8];
    // end
    // begin [file="/del.jsp";from=(13,3);to=(13,21)]
         Connection conn; 
    // end
    // begin [file="/del.jsp";from=(14,3);to=(14,20)]
         Statement stmt; 
    // end

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

            // end
            // begin [file="/del.jsp";from=(1,2);to=(1,48)]
                if (request.getParameter("delsubmit")==null) {
            // end
            // HTML // begin [file="/del.jsp";from=(1,50);to=(2,0)]
                out.write("\r\n");

            // end
            // begin [file="/del.jsp";from=(2,0);to=(2,30)]
                if (true) {
                    out.clear();
                    String _jspx_qfStr = "";
                    pageContext.forward("edit.jsp" +  _jspx_qfStr);
                    return;
                }
            // end
            // HTML // begin [file="/del.jsp";from=(2,30);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/del.jsp";from=(3,2);to=(3,3)]
                }
            // end
            // HTML // begin [file="/del.jsp";from=(3,5);to=(11,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="/del.jsp";from=(11,0);to=(11,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="/del.jsp";from=(11,43);to=(12,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/del.jsp";from=(12,36);to=(13,0)]
                out.write("\r\n");

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

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

            // end
            // begin [file="/del.jsp";from=(15,2);to=(34,0)]
                
                if (session.getValue("username")!=null) {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
                conn=DriverManager.getConnection("jdbc:odbc:song","","") ;
                stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE) ;
                for (int i=0;i<8;i++) {
                s_name[i]=request.getParameter(String.valueOf(i)) ;
                if (s_name[i]!=null) {
                   s_name[i]=new String(s_name[i].getBytes("ISO-8859-1"));
                   stmt.executeUpdate("delete from singer where sname='"+s_name[i]+"'") ;
                   out.println("<p align=\"center\">记录已成功删除!</p>") ;
                }
                }
                  stmt.close() ;
                  conn.close() ;
                }
                else {
                  out.println("<p align=\"center\">您没有使用本功能的权限!</p>");
                }
            // end
            // HTML // begin [file="/del.jsp";from=(34,2);to=(36,49)]
                out.write("\r\n<table align=\"center\" width=\"100%\">\r\n<tr><td align=\"center\"><a href=\"index.jsp?currow=");

            // end
            // begin [file="/del.jsp";from=(36,52);to=(36,82)]
                out.print(request.getParameter("currow"));
            // end
            // HTML // begin [file="/del.jsp";from=(36,84);to=(39,0)]
                out.write("\">返回</a></td></tr>\r\n</tr>\r\n</table>\r\n");

            // end
            // begin [file="/del.jsp";from=(39,0);to=(39,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="/del.jsp";from=(39,43);to=(42,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 + -