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

📄 show1_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 show1_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\r\n\r\n\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');

int year=Integer.parseInt(request.getParameter("year"));
int sum=dao.sum(year);
List list =(List)request.getAttribute("list");

      out.write("\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>");
      out.print(year);
      out.write("年网站流量统计</title>\r\n<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\r\n</head>\r\n\r\n<body>\r\n<div align=\"center\"><br>");
      out.print(sum);
      out.write("年网站流量统计<br><br>\r\n  <table width=\"660\" height=\"450\" border=\"1\"   cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolordark=\"#000000\" bordercolorlight=\"#FFFFFF\" >\r\n    <tr>\r\n      <td width=\"54\" height=\"400\"><p>宽60</p>\r\n      <p>高400</p></td>\r\n      <td><table width=\"600\" height=\"400\" border=\"0\" cellpadding=\"0\"  cellspacing=\"0\" bordercolor=\"#000000\">\r\n        <tr valign=\"bottom\">\r\n          ");

    for(int i=0;i<list.size();i++){
      MonthForm form=(MonthForm)list.get(i);
    
      out.write("\r\n          <td width=\"50\">     <div align=\"center\">");
      out.print(form.getOne());
      out.write("</div>\r\n            <table width=\"25\" height=\"");
      out.print(dao.rate(form.getOne(),sum));
      out.write("\" border=\"1\" align=\"center\" cellspacing=\"0\" bordercolor=\"#000000\"  bgcolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t     <div align=\"center\">");
      out.print(form.getTwo());
      out.write("</div>\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getTwo(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\" >\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t   <div align=\"center\">");
      out.print(form.getThree());
      out.write("</div>\r\n\t\t  <table width=\"25\" border=\"1\"height=\"");
      out.print(dao.rate(form.getThree(),sum));
      out.write("\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\" >\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t     <div align=\"center\">");
      out.print(form.getFour());
      out.write("</div>\r\n\t\t  <table width=\"25\"height=\"");
      out.print(dao.rate(form.getFour(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t   <div align=\"center\">");
      out.print(form.getFive());
      out.write("</div>\r\n\t\t  <table width=\"25\"height=\"");
      out.print(dao.rate(form.getFive(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\"  bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t    <div align=\"center\">");
      out.print(form.getSix());
      out.write("</div>\r\n\t\t  <table width=\"25\"  height=\"");
      out.print(dao.rate(form.getSix(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\" >\r\n              <tr>\r\n                <td>&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t  <div align=\"center\">");
      out.print(form.getSeven());
      out.write("</div>\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getSeven(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t     <div align=\"center\">");
      out.print(form.getEight());
      out.write("</div>\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getEight(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\"  bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t    <div align=\"center\">");
      out.print(form.getNine());
      out.write("</div>\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getNine(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t  <div align=\"center\">");
      out.print(form.getTen());
      out.write("</div>\r\n\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getTen(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\"  bordercolor=\"#000000\">\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          <td width=\"50\">\r\n\t\t     <div align=\"center\">");
      out.print(form.getEleven());
      out.write("</div>\r\n\t\t  <table width=\"25\" height=\"");
      out.print(dao.rate(form.getEleven(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\"bordercolor=\"#000000\" >\r\n              <tr>\r\n                <td >&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n\r\n          <td width=\"50\">\r\n\t\t <div align=\"center\">");
      out.print(form.getTwleve());
      out.write("</div>\r\n            <table width=\"25\"  height=\"");
      out.print(dao.rate(form.getTwleve(),sum));
      out.write("\" border=\"1\" align=\"center\"  bgcolor=\"#000000\" cellspacing=\"0\" bordercolor=\"#000000\">\r\n              <tr>\r\n                <td>&nbsp;</td>\r\n              </tr>\r\n          </table></td>\r\n          ");
}
      out.write("\r\n        </tr>\r\n      </table></td>\r\n    </tr>\r\n    <tr>\r\n      <td height=\"50\">高30</td>\r\n      <td><table width=\"600\" border=\"0\">\r\n        <tr>\r\n          <td width=\"50\"><div align=\"center\"><strong>一月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>二月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>三月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>四月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>五月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>六月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>七月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>八月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>九月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>十月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>十一月</strong></div></td>\r\n          <td width=\"50\"><div align=\"center\"><strong>十二月</strong></div></td>\r\n");
      out.write("        </tr>\r\n      </table></td>\r\n    </tr>\r\n  </table>\r\n</div>\r\n</body>\r\n</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 + -