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

📄 setattributejsp_0002ejsp_jsp.java

📁 一个聊天系统
💻 JAVA
字号:
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class SetAttributeJsp_0002ejsp_jsp extends HttpJspBase {


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

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

            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(2,30);to=(19,0)]
                out.write("\r\n\r\n\r\n<html>\r\n<head>\r\n\r\n<meta http-equiv=\"Content-Language\" content=\"zh-cn\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\">\r\n<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\r\n<title bgcolor =\"#008080\">SetAttributeJsp</title>\r\n\r\n</head>\r\n<body bgcolor=\"#008080\">\r\n<h1>\r\n在这里你可以修改各种参数\r\n</h1>\r\n");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(19,2);to=(38,0)]
                
                String port;
                String refreshtime;
                String reintime;
                
                String url="jdbc:odbc:chatroom";
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                Connection conn=DriverManager.getConnection(url);
                Statement stat=conn.createStatement();
                
                String sql=new String();
                sql="select * from chat_attribute";
                ResultSet rsl=stat.executeQuery(sql);
                if(rsl.next()!=false)
                {
                  port=rsl.getString("port");
                  refreshtime=rsl.getString("refreshtime");
                  reintime=rsl.getString("reintime");
                
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(38,2);to=(50,72)]
                out.write("\r\n\r\n</script>\r\n<form method=\"POST\" action=\"do_UpdateAttributeJsp.jsp\">\r\n  <div align=\"center\">\r\n    <center>\r\n    <table border=\"1\" width=\"50%\" cellpadding=\"2\">\r\n      <tr>\r\n        <td width=\"100%\" colspan=\"2\"><font color=\"#00FFFF\">输入修改参数</font></td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"39%\" align=\"left\"><b><font face=\"楷体_GB2312\">端口</font></b></td>\r\n        <td width=\"66%\"><input type=\"text\" name=\"port\" size=\"20\" value =");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(50,75);to=(50,79)]
                out.print(port);
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(50,81);to=(54,78)]
                out.write("> </td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"39%\" align=\"left\"><b><font face=\"楷体_GB2312\">房间刷新时间间隔</font></b></td>\r\n        <td width=\"66%\"><input type=\"text\" name=\"refreshtime\" size=\"20\" value=");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(54,81);to=(54,92)]
                out.print(refreshtime);
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(54,94);to=(58,74)]
                out.write(">  </td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"39%\" align=\"left\"><b><font face=\"楷体_GB2312\">被踢用户的重新进入房间的时间间隔</font></b></td>\r\n        <td width=\"66%\"><input type=\"text\" name=\"reintime\" size=\"20\"value=");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(58,77);to=(58,85)]
                out.print(reintime);
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(58,87);to=(66,0)]
                out.write("></td>\r\n      </tr>\r\n    </table>\r\n    </center>\r\n  </div>\r\n  <p align=\"center\"><input type=\"submit\" value=\"确定\" name=\"B1\" >&nbsp;&nbsp;&nbsp;\r\n  <input type=\"reset\" value=\"取消\" name=\"B2\"></p>\r\n</form>\r\n");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(66,2);to=(71,0)]
                
                }
                else
                {
                  out.print("数据出错!");
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(71,2);to=(73,0)]
                out.write("\r\n  <p><a href=\"SetAttributeJsp.jsp\">返回</a></p>\r\n");

            // end
            // begin [file="/SetAttributeJsp.jsp";from=(73,2);to=(75,0)]
                
                }
            // end
            // HTML // begin [file="/SetAttributeJsp.jsp";from=(75,2);to=(81,0)]
                out.write("\r\n\r\n\r\n\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 + -