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

📄 index_jsp.java

📁 新闻网络中心 sql2000 jsp tomcat
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.List;
import com.actionForm.NewsForm;

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');
      com.dao.NewsDao newsDao = null;
      synchronized (request) {
        newsDao = (com.dao.NewsDao) _jspx_page_context.getAttribute("newsDao", PageContext.REQUEST_SCOPE);
        if (newsDao == null){
          newsDao = new com.dao.NewsDao();
          _jspx_page_context.setAttribute("newsDao", newsDao, PageContext.REQUEST_SCOPE);
        }
      }
      out.write("\r\n\r\n\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      com.dao.SortDao sortDao = null;
      synchronized (request) {
        sortDao = (com.dao.SortDao) _jspx_page_context.getAttribute("sortDao", PageContext.REQUEST_SCOPE);
        if (sortDao == null){
          sortDao = new com.dao.SortDao();
          _jspx_page_context.setAttribute("sortDao", sortDao, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      com.tool.TimeShow time = null;
      synchronized (request) {
        time = (com.tool.TimeShow) _jspx_page_context.getAttribute("time", PageContext.REQUEST_SCOPE);
        if (time == null){
          time = new com.tool.TimeShow();
          _jspx_page_context.setAttribute("time", time, PageContext.REQUEST_SCOPE);
        }
      }
      out.write("\r\n<title>宇晨网络新闻中心前台首页</title>\r\n</head>\r\n<link rel=\"stylesheet\" href=\"css/style.css\">\r\n<body><div align=\"center\">\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "fTop.jsp", out, false);
      out.write("\r\n <table width=\"800\" height=\"678\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n   <tr>\r\n     <td width=\"216\" rowspan=\"3\" valign=\"top\">");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "fleft.jsp", out, false);
      out.write("</td>\r\n     <td height=\"216\" valign=\"middle\">\r\n\t <table width=\"584\" height=\"224\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"fImage/rightOne.jpg\">\r\n       <tr>\r\n         <td height=\"44\"><table width=\"262\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n           <tr>\r\n             <td width=\"131\" height=\"18\">&nbsp;</td>\r\n             <td width=\"134\"><div align=\"right\" class=\"word_white\"><strong><a href=\"newsAction.do?method=frontSelectBigSortAction&bigSort=时政要闻&image=politics\"><font color=\"#FFFFFF\">more...</font></a></strong></div></td>\r\n           </tr>\r\n         </table></td>\r\n         <td height=\"44\"><table width=\"262\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n           <tr>\r\n             <td width=\"131\" height=\"18\">&nbsp;</td>\r\n             <td width=\"134\"><div align=\"right\" ><strong><a href=\"newsAction.do?method=frontSelectBigSortAction&bigSort=经济动向&image=economy\"><font color=\"#FFFFFF\">more...</font></a></strong></div></td>\r\n           </tr>\r\n         </table></td>\r\n");
      out.write("       </tr>\r\n       <tr>\r\n         <td width=\"293\" height=\"180\" valign=\"top\">\r\n\t\t    \t\t   ");

         List polityList=newsDao.selectNews("时政要闻");
         int polityNumber=polityList.size();
         if(polityNumber>5){polityNumber=5;}
         
      out.write(' ');
if(polityNumber==0){
      out.write("<div align=\"center\"><br>暂无</div>");
}else{
      out.write("\r\n\t\t               <table width=\"234\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n            ");

           for(int polity=0;polity<polityNumber;polity++){
             NewsForm  polityForm=(NewsForm)polityList.get(polity);
             
      out.write("\r\n\t\t   <tr >\r\n                <td width=\"77\" height=\"25\"><strong><a href=\"newsAction.do?method=frontSelectSmallSortAction&sortId=");
      out.print(polityForm.getSortId());
      out.write("&bigSort=");
      out.print(polityForm.getBigSort());
      out.write("&image=politics\">[");
      out.print(sortDao.selectSortName(polityForm.getSortId()));
      out.write("]</a></strong></td>\r\n             <td width=\"115\"><a href=\"newsAction.do?method=frontSelectOneAction&id=");
      out.print(polityForm.getId());
      out.write('"');
      out.write('>');
      out.print(polityForm.getTitle());
      out.write("</a></td>\r\n             <td width=\"42\">\r\n             ");
if(polityForm.getCreateTime().equals(time.cuttentMonthDate())){
      out.write("\r\n             <img src=\"fImage/new.gif\">");
}else{
      out.write("\r\n               ");
      out.print(polityForm.getCreateTime());
      out.write("\r\n             ");
}
      out.write("\r\n             </td>\r\n           </tr>\r\n         ");
}
      out.write("\r\n         </table>\r\n         ");
}
      out.write("</td>\r\n         <td width=\"291\" valign=\"top\">\r\n\t\t   \t\t   ");

         List economyList=newsDao.selectNews("经济动向");
         int economyNumber=economyList.size();
         if(economyNumber>5){economyNumber=5;}
         
      out.write("\r\n\t\t  ");
if(economyNumber==0){
      out.write("<div align=\"center\"><br>暂无</div>");
}else{
      out.write("\r\n\t\t  <br><table width=\"234\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n               ");

           for(int economy=0;economy<economyNumber;economy++){
             NewsForm economyForm=(NewsForm)economyList.get(economy);
             
      out.write("\r\n           <tr >\r\n                 <td width=\"77\" height=\"25\"><strong><a href=\"newsAction.do?method=frontSelectSmallSortAction&sortId=");
      out.print(economyForm.getSortId());
      out.write("&bigSort=");
      out.print(economyForm.getBigSort());
      out.write("&image=economy\">[");
      out.print(sortDao.selectSortName(economyForm.getSortId()));
      out.write("]</a></strong></td>\r\n             <td width=\"115\"><a href=\"newsAction.do?method=frontSelectOneAction&id=");
      out.print(economyForm.getId());
      out.write('"');
      out.write('>');
      out.print(economyForm.getTitle());
      out.write("</a></td>\r\n             <td width=\"42\">\r\n             ");
if(economyForm.getCreateTime().equals(time.cuttentMonthDate())){
      out.write("\r\n            <img src=\"fImage/new.gif\">");
}else{
      out.write("\r\n               ");
      out.print(economyForm.getCreateTime());
      out.write("\r\n             ");
}
      out.write("\r\n             </td>\r\n           </tr>\r\n           ");
}
      out.write("\r\n         </table>");
}
      out.write("<br></td>\r\n       </tr>\r\n     </table>\r\n\r\n\r\n\r\n \t  </td>\r\n    </tr>\r\n   <tr>\r\n     <td height=\"222\">\r\n\r\n\t <table width=\"584\" height=\"226\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"fImage/rightTwo.jpg\">\r\n       <tr>\r\n         <td height=\"44\"><table width=\"262\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n           <tr>\r\n             <td width=\"131\" height=\"18\">&nbsp;</td>\r\n             <td width=\"134\"><div align=\"right\"><strong><a href=\"newsAction.do?method=frontSelectBigSortAction&bigSort=法制教育&image=law\"><font color=\"#FFFFFF\">more...</font></a></strong></div></td>\r\n           </tr>\r\n         </table></td>\r\n         <td height=\"44\"><table width=\"262\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n           <tr>\r\n             <td width=\"131\" height=\"18\">&nbsp;</td>\r\n             <td width=\"134\"><div align=\"right\"><strong><a href=\"newsAction.do?method=frontSelectBigSortAction&bigSort=科学教育&image=science\"><font color=\"#FFFFFF\">more...</font></a></strong></div></td>\r\n           </tr>\r\n");
      out.write("         </table></td>\r\n       </tr>\r\n       <tr>\r\n         <td width=\"293\" height=\"182\" valign=\"top\">\r\n\t\t  \t\t   ");

         List lawList=newsDao.selectNews("法制教育");
         int lawNumber=lawList.size();
         if(lawNumber>5){lawNumber=5;}
         
      out.write("\r\n\t\t  ");

⌨️ 快捷键说明

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