index_jsp.java

来自「jsp_javabean+tomcat的web管理系统!」· Java 代码 · 共 213 行

JAVA
213
字号
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  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;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\r');
      out.write('\n');
      msrv.NDBConn conn = null;
      synchronized (_jspx_page_context) {
        conn = (msrv.NDBConn) _jspx_page_context.getAttribute("conn", PageContext.PAGE_SCOPE);
        if (conn == null){
          conn = new msrv.NDBConn();
          _jspx_page_context.setAttribute("conn", conn, PageContext.PAGE_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\">\r\n");
      out.write("<meta name=\"description\" content=\"上海激动通信有限公司业务处理服务V1.0\">\r\n");
      out.write("<title>上海激动通信有限公司业务统计系统V1.0</title>\r\n");
      out.write("<link href=\"css/all.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".style1 {color: #000000}\r\n");
      out.write(".style2 {color: #FFFFFF}\r\n");
      out.write("-->\r\n");
      out.write("</style>\r\n");
      out.write("</head>\r\n");
      out.write("<body style=\"MARGIN: 0px\" scroll=no onResize=javascript:parent.carnoc.location.reload()>\r\n");
      out.write("\r\n");
      out.write("<script>\r\n");
      out.write("if(self!=top){top.location=self.location;}\r\n");
      out.write("function switchSysBar(){\r\n");
      out.write("if (switchPoint.innerText==3){\r\n");
      out.write("switchPoint.innerText=4\r\n");
      out.write("document.all(\"frmTitle\").style.display=\"none\"\r\n");
      out.write("}else{\r\n");
      out.write("switchPoint.innerText=3\r\n");
      out.write("document.all(\"frmTitle\").style.display=\"\"\r\n");
      out.write("}}\r\n");
      out.write("</script>\r\n");
      out.write("\r\n");
      out.write("<style type=\"text/css\">.navPoint {COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt}\r\n");
      out.write("</style>\r\n");

 String sql="";
 ResultSet rs=null;
 sql="select tsp_id,tsp_name,tsp_status from msrv.dbo.tb_srv_proj where tsp_layerID=1 order by tsp_id asc";
 try{
    rs=conn.executeQuery(sql);
 }catch(SQLException ex){
   out.print(ex.getMessage());
 }
 if(request.getParameter("exit")!=null&&request.getParameter("exit").equals("ok")){
    session.setAttribute("msrvUserID",null);
	session.invalidate();
	out.println("<script>window.location='index.jsp';</script>");
 }

      out.write("\r\n");
      out.write("<table border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" height=\"100%\" width=\"100%\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"200\" align=\"middle\" vAlign=\"top\" noWrap \" id=\"frmTitle\" style=\"width:200px\" name=\"frmTitle\">\r\n");
      out.write("      <table width=\"100%\" height=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td height=\"25\" valign=\"top\"><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("              <tr>\r\n");
      out.write("                <td height=\"31\" align=\"center\" bgcolor=\"808080\"><span class=\"style2\">激动业务数据管理</span></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("          </table></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td height='18' valign=\"top\" background=\"images/libg.jpg\"><img src='images/lefttree/blank.gif' width='2' height='18'></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td valign=\"top\">\r\n");
      out.write("\t\t  <iframe frameBorder=\"0\" id=\"carnoc\" name=\"carnoc\" scrolling=auto src=\"left.jsp\" style=\"HEIGHT: 100%; VISIBILITY: inherit;WIDTH: 200px; Z-INDEX: 2\"></iframe>\t\t  </td>\r\n");
      out.write("        </tr>\r\n");
      out.write("        <tr>\r\n");
      out.write("          <td height=\"100\" valign=\"bottom\">\r\n");
      out.write("\t\t  ");
try{
		     while(rs.next()){
		  
      out.write("\r\n");
      out.write("\t\t    <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"808080\">\r\n");
      out.write("              <tr>\r\n");
      out.write("                <td id=\"button1\" height=\"25\" valign=\"middle\" background=\"images/leftlan02.jpg\">&nbsp;<a target=\"carnoc\" href=\"msrv.ItemManage.Menu?tsp_id=");
      out.print(rs.getString(1));
      out.write('"');
      out.write('>');
      out.print(rs.getString(2));
      out.write("</a></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("            </table>\r\n");
      out.write("\t\t  ");

		    }
		  }catch(SQLException ex){
		     out.print("数据库操作出现意外:"+ex.getMessage());
		   }finally{
		   
			try{
		     if(rs!=null){
			    rs.close();
				rs=null;
			 }
			}catch(SQLException ex){out.print(ex.getMessage());}
		   }
		   
      out.write("\r\n");
      out.write("\t\t    <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"808080\">\r\n");
      out.write("              <tr>\r\n");
      out.write("                <td id=\"button1\" height=\"25\" valign=\"middle\" background=\"images/leftlan02.jpg\">&nbsp;<a href=\"left.jsp\" target=\"carnoc\">更改用户</a> <a href=\"index.jsp?exit=ok\">安全退出</a></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("            </table>\r\n");
      out.write("            </td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table>\r\n");
      out.write("    </td>\r\n");
      out.write("    <td width=\"68\" class=a2 style=\"WIDTH: 3pt\">\r\n");
      out.write("    <table border=\"0\" bgcolor=\"#666666\" cellPadding=\"0\" cellSpacing=\"1\" height=\"100%\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td width=\"13\" bgcolor=\"#CCCCCC\" style=\"HEIGHT: 100%\" onclick=\"switchSysBar()\">\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <span class=\"navPoint\" id=\"switchPoint\" title=\"关闭/打开左栏\"></span><br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>        <span class=\"style1\"><br>\r\n");
      out.write("        </span></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("    </td>\r\n");
      out.write("    <td width=\"510\" style=\"WIDTH: 100%\">\r\n");
      out.write("    <iframe frameBorder=\"0\" id=\"main\" name=\"main\" scrolling=\"yes\" src=\"main.jsp\" style=\"HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1\">\r\n");
      out.write("    </iframe>\r\n");
      out.write("   </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("</html>\r\n");

conn.close();

      out.write("\r\n");
      out.write("<script>\r\n");
      out.write("if(window.screen.width<'1024'){switchSysBar()}\r\n");
      out.write("</script>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?