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

📄 index_jsp.java

📁 网站流量查询系统 基本上每个网站都会统计访问率。网站访问量是每个网站所有者追求的目标
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import java.sql.*;
import com.domain.MonthForm;

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,
      			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\n");
      com.dao.MonthDao dao = null;
      synchronized (request) {
        dao = (com.dao.MonthDao) _jspx_page_context.getAttribute("dao", PageContext.REQUEST_SCOPE);
        if (dao == null){
          dao = new com.dao.MonthDao();
          _jspx_page_context.setAttribute("dao", dao, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

List list=dao.showMonth(1000);

      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("<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
      out.write("<title>\r\n");
      out.write("年份查询\r\n");
      out.write("</title>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".style2 {\r\n");
      out.write("\tcolor: #FF0000;\r\n");
      out.write("\tfont-size: 24px;\r\n");
      out.write("\tfont-weight: bold;\r\n");
      out.write("}\r\n");
      out.write("-->\r\n");
      out.write("</style>\r\n");
      out.write("</head>\r\n");
      out.write("<body><br>\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("  <table width=\"307\" height=\"265\" border=\"0\">\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td height=\"123\" valign=\"top\" bgcolor=\"#FFCC00\">\r\n");
      out.write("\t    <div align=\"center\" class=\"style2\">网站流量查询</div>\r\n");
      out.write("\t    <br><br>\r\n");
      out.write("\t    <table width=\"278\" border=\"0\" align=\"center\" cellpadding=\"0\" >\r\n");
      out.write("    <tr align=\"center\" bgcolor=\"#FFFFFF\">\r\n");
      out.write("      <td width=\"133\" height=\"23\">查询年份</td>\r\n");
      out.write("      <td width=\"139\">操作</td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    ");

    for(int i=0;i<list.size();i++){
    MonthForm form=(MonthForm)list.get(i);

    
      out.write("\r\n");
      out.write("    <tr align=\"center\" bgcolor=\"#FFFFFF\">\r\n");
      out.write("      <td height=\"23\">");
      out.print(form.getYears());
      out.write("</td>\r\n");
      out.write("      <td><a href=\"sumAction.do?year=");
      out.print(form.getYears());
      out.write("\">查看</a></td>\r\n");
      out.write("\r\n");
      out.write("    </tr>\r\n");
      out.write("    ");
}
      out.write("\r\n");
      out.write("  </table>\t  </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  </table>\r\n");
      out.write("  <p>&nbsp;  </p>\r\n");
      out.write("</div>\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 + -