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

📄 secondlevel_jsp.java

📁 源码新闻发布系统
💻 JAVA
字号:
package org.apache.jsp;

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

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

Connection con=null; 
  private static java.util.List _jspx_dependants;

  public Object 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=GBK");
      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");
      newsreleasesystem.SQLBean sqlb = null;
      synchronized (session) {
        sqlb = (newsreleasesystem.SQLBean) _jspx_page_context.getAttribute("sqlb", PageContext.SESSION_SCOPE);
        if (sqlb == null){
          sqlb = new newsreleasesystem.SQLBean();
          _jspx_page_context.setAttribute("sqlb", sqlb, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>\r\n");
      out.write("SecondLevel\r\n");
      out.write("</title>\r\n");
      out.write("</head>\r\n");
      out.write("<body bgcolor=\"#ffffff\">\r\n");
      out.write("<p>\r\n");
      out.write("<h1 align=\"center\">\r\n");
      out.write("二级标题及文件位置发布\r\n");
      out.write("</h1>\r\n");
      out.write("<p>\r\n");
      out.write("<form action=\"/JspModule/secondleveltitlepublishservlet\" method=\"POST\">\r\n");
      out.write("<table align=\"center\">\r\n");
      out.write("<tr>\r\n");
      out.write("    <td>一级标题:</td>\r\n");
      out.write("    <td><select name=\"firstlevel\">\r\n");

try {
  if(sqlb.getCon()!=null){
  con=sqlb.getCon();
  String strSql="select * from FirstLevelTitle";
  Statement stmt=con.createStatement();
  ResultSet rs=stmt.executeQuery(strSql);
  while(rs.next()){
      out.write("\r\n");
      out.write("  <option>");
      out.print(rs.getString(2) );
      out.write("</option>\r\n");
      out.write("  ");
} 
      out.write('\r');
      out.write('\n');
}
}
catch (Exception ex) {
  System.out.println(ex.getMessage());
}

      out.write("\r\n");
      out.write("    </select></td>\r\n");
      out.write("</tr>\r\n");
      out.write("<tr>\r\n");
      out.write("    <td>二级标题:</td>\r\n");
      out.write("    <td><input type=\"text\" name=\"secondlevel\" size=\"20\"/></td>\r\n");
      out.write("</tr>\r\n");
      out.write("<tr>\r\n");
      out.write("    <td>文件位置:</td>\r\n");
      out.write("    <td><input type=\"file\" value=\"\"/></td>\r\n");
      out.write("</tr>\r\n");
      out.write("<tr>\r\n");
      out.write("    <td></td>\r\n");
      out.write("    <td><input type=\"submit\" value=\"确定\"/><input type=\"reset\" value=\"重置\"/></td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<div align=\"center\">(二级标题最好与新闻稿件一致)</div>\r\n");
      out.write("<p><p><p><p>\r\n");
      out.write("<table align=\"center\">\r\n");
      out.write("<tr>\r\n");
      out.write("<td><font face=\"华文行楷\">注意:发布前请认真检查输入的标题是否正确。</font></td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("</form>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -