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

📄 default_jsp.java

📁 做的非常好的论坛
💻 JAVA
字号:
package org.apache.jsp;

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

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

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/inc/conn.jsp");
  }

  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,
      			null, 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\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write('\r');
      out.write('\n');

     //java.sql.Connection conn;
     //java.sql.Statement stmt;
     //java.sql.ResultSet rs;
     //Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
     //String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=bbs";
     //String user="sa";
     //String password="";
     //conn=DriverManager.getConnection(url,user,password);
     //stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
//Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance(); 
//String url="jdbc:jtds:sqlserver://localhost:1433/bbs;USER=sa;PASSWORD="; 
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  String url="jdbc:odbc:db2000";

Connection conn= DriverManager.getConnection(url); 
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); 
//Statement stmt=conn.createStatement();
/*String sql="select BBS_Cate_Name,BBS_Cate_ID,BBS_Cate_PID from BBS_Cate where BBS_Cate_PID='0' and BBS_Cate_ID<>'A_3' and deleted=0 order by totop asc";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next())
out.print(rs.getString("BBS_Cate_Name"));*/
/*String BoardID_1="1",BoardID_2="2",user_id="123",name="3",title="4",menu="5",IP="6",date1="20:00:10",redate="20:00:10",zhiye="123",bbs_img_display="123",bbs_img_text="123",img_url_display="123",deleted="123",picture="123";
String sql="insert into bbstitle(BoardID_1,BoardID_2,user_id,name,title,menu,ip,date1,redate,zhiye,bbs_img_display,bbs_img_text,img_url_display,deleted,picture)";
sql=sql=sql+" values('"+BoardID_1+"','"+BoardID_2+"','"+user_id+"','"+name+"','"+title+"','"+menu+"','"+IP+"','"+date1+"','"+redate+"',"+zhiye+",1,'"+bbs_img_text+"',0,0,'"+picture+"')";
stmt.executeUpdate(sql);*/



/*while(rs.next())
{

   out.print(rs.getObject("id"));
}*/

      out.write(' ');
      out.write('\r');
      out.write('\n');

String lk1,lk2;
String id=request.getParameter("id");
String a=request.getParameter("a");
String b=request.getParameter("b");
String opentree ="bbs/bbsleft.jsp";
String urlfile="bbs/main.jsp";

if(id!=null){
urlfile="bbs/checkasp.jsp?id="+id;
}
//else{
//urlfile="main.jsp?layer_1="+a+"&layer_2="+b;
//}

if(a!=null&&b!=null)
{
urlfile="bbs/main.jsp?layer_1="+a+"&layer_2="+b;
}

if(a!=null)
{
urlfile="bbs/main.jsp?layer_1="+a;
}

//out.print(urlfile);
//out.close();
String sql="select * from config where kind=5 order by id asc";
ResultSet rs=stmt.executeQuery(sql);
if(rs.next())
out.print("存在该选项");

      out.write("\r\n");
      out.write("\r\n");
      out.write("<HTML>\r\n");
      out.write("<HEAD>\r\n");
      out.write("<TITLE>");
      out.write("</TITLE>\r\n");
      out.write("<META content=\"text/html; charset=gbk\" http-equiv=Content-Type><LINK \r\n");
      out.write("href=\"css/news2.css\" rel=stylesheet type=text/css>\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==4){\r\n");
      out.write("switchPoint.innerText=3\r\n");
      out.write("document.all(\"frmTitle\").style.display=\"\"\r\n");
      out.write("}else{\r\n");
      out.write("switchPoint.innerText=4\r\n");
      out.write("document.all(\"frmTitle\").style.display=\"none\"\r\n");
      out.write("}}\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("<STYLE type=text/css>.navPoint {\r\n");
      out.write("\tCOLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt\r\n");
      out.write("}\r\n");
      out.write("</STYLE>\r\n");
      out.write("<META content=\"MSHTML 5.00.3700.6699\" name=GENERATOR></HEAD>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<BODY scroll=no style=\"MARGIN: 0px\">\r\n");
      out.write("<TABLE border=0 cellPadding=0 cellSpacing=0 height=\"100%\" width=\"100%\">\r\n");
      out.write("  <TBODY>\r\n");
      out.write("  <TR>\r\n");
      out.write("    <TD align=middle id=frmTitle noWrap vAlign=center>\r\n");
      out.write("\t<IFRAME frameBorder=0 id=left name=left scrolling=yes src=\"");
      out.print(opentree);
      out.write("\" \r\n");
      out.write("      style=\"HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 140px; Z-INDEX: 2\">\r\n");
      out.write("    </IFRAME></TD>\r\n");
      out.write("    <TD bgColor=#a4b6d7>\r\n");
      out.write("      <TABLE border=0 cellPadding=0 cellSpacing=0 height=\"100%\">\r\n");
      out.write("        <TBODY>\r\n");
      out.write("        <TR>\r\n");
      out.write("          <TD onclick=switchSysBar() \r\n");
      out.write("            style=\"HEIGHT: 100%\"><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><SPAN \r\n");
      out.write("            class=navPoint id=switchPoint \r\n");
      out.write("            title=关闭/打开左栏>4</SPAN><BR><BR><BR><BR><BR><BR><BR><BR></TD></TR></TBODY></TABLE></TD>\r\n");
      out.write("    <TD style=\"WIDTH: 100%\">\r\n");
      out.write("\t<IFRAME frameBorder=0 id=main name=main scrolling=yes src=\"");
      out.print(urlfile);
      out.write("\" \r\n");
      out.write("      style=\"HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1\">\r\n");
      out.write("    </IFRAME></TD></TR></TBODY></TABLE>\r\n");
      out.write("<SCRIPT>\r\n");
      out.write("if(window.screen.width<'1024'){switchSysBar()}\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("</BODY>\r\n");
      out.write("</HTML>");
    } 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -