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

📄 it_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 it_0002ejsp_jsp extends HttpJspBase {


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

            // end
            // HTML // begin [file="/it.jsp";from=(1,30);to=(24,0)]
                out.write("\r\n<style type=\"text/css\">\r\n<!--\r\nbody {\r\n\tbackground-color: #99CCFF;\r\n}\r\n-->\r\n</style>\r\n<style type=\"text/css\">\r\n   <!--\r\n   a:link { text-decoration: none;color: #FF6600}\r\n   a:active { text-decoration:blink}\r\n   a:hover { text-decoration:underline;color: red}\r\n   a:visited { text-decoration: none;color: green}\r\n   -->\r\n   </style>\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="/it.jsp";from=(24,2);to=(27,1)]
                
                String time=(String)session.getAttribute("time");
                if(time==null||time=="")
                {
            // end
            // HTML // begin [file="/it.jsp";from=(27,3);to=(30,0)]
                out.write("\r\n<p>没有该日程!</p>\r\n<p><a href=\"time.html\">回上一页</a>\r\n");

            // end
            // begin [file="/it.jsp";from=(30,2);to=(30,8)]
                }else{
            // end
            // HTML // begin [file="/it.jsp";from=(30,10);to=(35,6)]
                out.write("\r\n</p>\r\n<form action=\"itt.jsp\" method=\"post\">\r\n  <div align=\"center\">\r\n    <p>\r\n      ");

            // end
            // begin [file="/it.jsp";from=(35,8);to=(46,0)]
                
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String driver = "jdbc:odbc:shm";
                Connection conn = DriverManager.getConnection(driver,"sa","");
                Statement stmt = conn.createStatement();
                //生成查询的sql命令
                String sql="select * from cont where time='"+time+"'";
                //rs为返回结果的ResultSet对象
                ResultSet rs=stmt.executeQuery(sql);
                rs.next();
                String content=rs.getString("content").trim();
            // end
            // HTML // begin [file="/it.jsp";from=(46,2);to=(52,25)]
                out.write("\r\n    请按照下表修改该日程信息!</p>\r\n    <hr />\r\n    <table width=\"527\" border=\"0\">\r\n       <tr>\r\n        <td width=\"153\" height=\"32\">Time: </td>\r\n        <td width=\"364\" >");

            // end
            // begin [file="/it.jsp";from=(52,28);to=(52,32)]
                out.print(time);
            // end
            // HTML // begin [file="/it.jsp";from=(52,34);to=(53,42)]
                out.write("&nbsp;</td>\r\n\t\t<input type=\"hidden\" name=\"time\" value=\"");

            // end
            // begin [file="/it.jsp";from=(53,45);to=(53,49)]
                out.print(time);
            // end
            // HTML // begin [file="/it.jsp";from=(53,51);to=(57,57)]
                out.write("\">\r\n      </tr>\r\n     <tr>\r\n        <td height=\"27\">内容:</td>\r\n        <td><textarea name=\"content\" cols=\"50\" rows=\"20\">");

            // end
            // begin [file="/it.jsp";from=(57,60);to=(57,67)]
                out.print(content);
            // end
            // HTML // begin [file="/it.jsp";from=(57,69);to=(71,0)]
                out.write("</textarea></td>\r\n      </tr>\r\n     </table>\r\n    <hr />\r\n    <table width=\"320\" border=\"0\">\r\n      <tr>\r\n        <td height=\"31\"><input type=\"submit\" name=\"Submit\" value=\"确认\" /></td>\r\n        <td><input type=\"reset\" name=\"Submit2\" 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="/it.jsp";from=(71,2);to=(71,3)]
                }
            // end
            // HTML // begin [file="/it.jsp";from=(71,5);to=(74,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 + -