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

📄 userinfoadmjsp_0002ejsp_jsp.java

📁 基于JSP的网络聊天室系统,功能明了易懂
💻 JAVA
字号:
import java.sql.*;
import chatroomweb.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class UserInfoAdmJsp_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/UserInfoAdmJsp.jsp";from=(4,0);to=(4,68)]
    // end

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

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

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

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(4,0);to=(4,68)]
                chatroomweb.DbJspBean dbBean = null;
                boolean _jspx_specialdbBean  = false;
                 synchronized (pageContext) {
                    dbBean= (chatroomweb.DbJspBean)
                    pageContext.getAttribute("dbBean",PageContext.PAGE_SCOPE);
                    if ( dbBean == null ) {
                        _jspx_specialdbBean = true;
                        try {
                            dbBean = (chatroomweb.DbJspBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "chatroomweb.DbJspBean");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"chatroomweb.DbJspBean", exc);
                        }
                        pageContext.setAttribute("dbBean", dbBean, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialdbBean == true) {
            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(4,0);to=(4,68)]
                }
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(4,82);to=(16,0)]
                out.write("\r\n\r\n<html>\r\n<head>\r\n<title>\r\nUserInfoAdmJsp\r\n</title>\r\n</head>\r\n<body bgcolor=\"#008080\">\r\n<h1>\r\n用户浏览\r\n</h1>\r\n");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(16,2);to=(39,0)]
                
                   int user_count=0;
                   ResultSet rs;
                   int i=0;
                
                  try
                  {
                   dbBean.connect();
                   String sql="select * from user_info";
                   rs=dbBean.openRs(sql);
                   while(rs.next())
                   {
                      user_count++;
                   }
                    rs.close();
                  }    //检查人数
                  catch(Exception e)
                   {
                   }
                finally
                {
                }
                   // 显示
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(39,2);to=(40,29)]
                out.write("\r\n   <p align=\"center\"><h3>现有人员");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(40,32);to=(40,42)]
                out.print(user_count);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(40,44);to=(43,44)]
                out.write("人</h3></p>\r\n  <form method=\"POST\" action=\"do_UpdateUserInfoJsp.jsp\">\r\n    <input type=\"hidden\" name=\"type\" value=\"1\">\r\n    <input type=\"hidden\" name=\"count\" value=");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(43,47);to=(43,75)]
                out.print(Integer.toString(user_count));
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(43,77);to=(55,0)]
                out.write(">\r\n  <div align=\"center\">\r\n    <center>\r\n    <table border=\"1\" width=\"80%\" cellpadding=\"5\">\r\n    <tr>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>用户名</font></b></td>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>昵称</font></b></td>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>性别</font></b></td>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>电子邮件</font></b></td>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>教育</font></b></td>\r\n    </tr>\r\n\r\n");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(55,2);to=(71,0)]
                
                   String username;
                   String usernickname;
                   String usersex;
                   String useremail;
                   String useredu;
                   String sql="select * from user_info";
                   rs=dbBean.openRs(sql);
                   while(rs.next())
                  {
                      i++;
                      username=rs.getString("user_name");
                      usernickname=rs.getString("user_nikname");
                      usersex=rs.getString("user_sex");
                      useremail=rs.getString("user_email");
                      useredu=rs.getString("user_edu");
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(71,2);to=(73,63)]
                out.write("\r\n      <tr>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(73,66);to=(73,74)]
                out.print(username);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(73,76);to=(74,63)]
                out.write("</font></b></td>\r\n        <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(74,66);to=(74,78)]
                out.print(usernickname);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(74,80);to=(75,65)]
                out.write("</font></b></td>\r\n          <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(75,68);to=(75,75)]
                out.print(usersex);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(75,77);to=(76,66)]
                out.write("</font></b></td>\r\n           <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(76,69);to=(76,78)]
                out.print(useremail);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(76,80);to=(77,67)]
                out.write("</font></b></td>\r\n            <td width=\"20%\" align=\"left\"><b><font face=\"\"楷体_GB2312>");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(77,70);to=(77,77)]
                out.print(useredu);
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(77,79);to=(79,0)]
                out.write("</font></b></td>\r\n   </tr>\r\n");

            // end
            // begin [file="/UserInfoAdmJsp.jsp";from=(79,2);to=(81,0)]
                
                  }
            // end
            // HTML // begin [file="/UserInfoAdmJsp.jsp";from=(81,2);to=(100,0)]
                out.write("\r\n    </table>\r\n    </center>\r\n  </div>\r\n  <font face=\"\"楷体_GB2312>请输入要删除用户名</font>\r\n  <p align=\"center\"><input type=\"Text\", name=\"username\">  &nbsp;&nbsp;&nbsp;\r\n  <p align=\"center\"><input type=\"submit\" value=\"删除\" name=\"B1\" >\r\n</form >\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\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 + -