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

📄 t1_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 t1_0002ejsp_jsp extends HttpJspBase {


    static {
    }
    public t1_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="/t1.jsp";from=(0,0);to=(6,0)]
                out.write("<SCRIPT language=\"javascript\">\r\nfunction backward()\r\n{\r\n      history.back();\r\n}\r\n</SCRIPT>\r\n");

            // end
            // HTML // begin [file="/t1.jsp";from=(6,100);to=(26,0)]
                out.write("\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<title>确认信息</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody {\r\n\tbackground-color: #99CCFF;\r\n}\r\n-->\r\n</style>\r\n<link href=\"css/site.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n</head>\r\n<style type=\"text/css\"><!--@import url(css/jsp.css);body,td,th {\r\n\tfont-size: 12px;\r\n}\r\n--></style>\r\n<body>\r\n");

            // end
            // begin [file="/t1.jsp";from=(26,2);to=(46,0)]
                     String year=request.getParameter("year");
                       String month=request.getParameter("month");
                       String date=request.getParameter("date");
                       String time=year+month+date;
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String driver = "jdbc:odbc:shm";
                Connection conn = DriverManager.getConnection(driver,"sa","");
                Statement stmt = conn.createStatement();
                //判断所选用户ID是否与现有ID重名
                
                //生成查询的sql命令
                String sql="select * from cont where time='"+time+"'";
                //rs 为返回结果的ResultSet对象
                ResultSet rs=stmt.executeQuery(sql);
                if(rs.next())
                {
                //用户ID已经被其他申请
                rs.close();
                stmt.close();
                conn.close();
            // end
            // HTML // begin [file="/t1.jsp";from=(46,2);to=(50,0)]
                out.write("\r\n<p>对不起!该日安排已存在!</p>\r\n<p><input name=\"Button2\" type=\"button\" class=\"button1\" onClick=\"backward()\" value=\"返回上一步\">\r\n</p>\r\n");

            // end
            // begin [file="/t1.jsp";from=(50,2);to=(58,0)]
                }
                else{
                //用户id没有被申请,进入确认表单
                rs.close();
                String content=request.getParameter("content");
                //tmpbyte是为了解决有可能出现的乱码问题的
                byte[] tmpbyte=content.getBytes("ISO8859_1");
                content=new String(tmpbyte);
            // end
            // HTML // begin [file="/t1.jsp";from=(58,2);to=(60,40)]
                out.write("\r\n<FORM action=\"nn2.jsp\" method=\"post\">\r\n<input type=\"hidden\" name=\"time\" value=\"");

            // end
            // begin [file="/t1.jsp";from=(60,43);to=(60,47)]
                out.print(time);
            // end
            // HTML // begin [file="/t1.jsp";from=(60,49);to=(61,43)]
                out.write("\">\r\n<input type=\"hidden\" name=\"content\" value=\"");

            // end
            // begin [file="/t1.jsp";from=(61,46);to=(61,53)]
                out.print(content);
            // end
            // HTML // begin [file="/t1.jsp";from=(61,55);to=(67,19)]
                out.write("\">\r\n<div align=\"center\"><b><font size=\"3\">请认真检查该日程的安排</font></b>\r\n<hr width=\"100%\">\r\n<table width=\"414\" border=\"0\" cellspacing=\"2\" cellpadding=\"1\">\r\n<tr>\r\n  <td align=\"right\">Time:\r\n  <td align=\"left\">");

            // end
            // begin [file="/t1.jsp";from=(67,22);to=(67,26)]
                out.print(time);
            // end
            // HTML // begin [file="/t1.jsp";from=(67,28);to=(70,19)]
                out.write("\r\n<tr>\r\n  <td align=\"right\">内容:\r\n  <td align=\"left\">");

            // end
            // begin [file="/t1.jsp";from=(70,22);to=(70,29)]
                out.print(content);
            // end
            // HTML // begin [file="/t1.jsp";from=(70,31);to=(86,0)]
                out.write("\r\n<tr>\r\n   </td>\r\n</tr>\r\n</table>\r\n<hr />\r\n<table width=\"200\" border=\"0\">\r\n  <tr>\r\n    <td><input name=\"Submit\" type=\"submit\" class=\"button1\" value=\"确认\" /></td>\r\n    <td><input name=\"Submit2\" type=\"button\" class=\"button1\"  onclick=\"backward()\" value=\"返回上一步\"/></td>\r\n  </tr>\r\n</table>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</div>\r\n</FORM>\r\n");

            // end
            // begin [file="/t1.jsp";from=(86,2);to=(86,3)]
                }
            // end
            // HTML // begin [file="/t1.jsp";from=(86,5);to=(89,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 + -