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

📄 inbar_jsp.java

📁 基于jfreechart组件的矢量图绘制
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.lang.Math;
import java.text.DecimalFormat;

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

  final int NUMBER=4;  String[] barName={"bname0","bname1","bname2","bname3"};  String[] barValue={"bvalue0","bvalue1","bvalue2","bvalue3"};  String[] barType={"btype0","btype1","btype2","btype3"};  DecimalFormat precision=new DecimalFormat("0.0");
  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("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//w3c//dtd html 4.0 transitional//en\">\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<title>柱状图</title>\n");
      out.write("</head>\n");
      out.write("<body bgcolor=\"#ffddee\">\n");
      out.write("\n");
      out.write("<center>\n");
      out.write("<h2>请输入柱图的相关数据</h2>\n");
      out.write("<form action=\"Bar.jsp\" method=\"POST\">\n");
      out.write("<table WIDTH=\"800\">\n");
      out.write("<tr><td align=\"center\">Title    <input type=TEXT name=Title value=\"图表标题\">  </td> \n");
      out.write("    <td align=\"center\">项目个数<input type=TEXT name=Number value=");
      out.print(NUMBER);
      out.write("></td>\n");
      out.write("<tr>\n");
 for(int i=0;i<NUMBER;i++){
      out.write("\n");
      out.write(" <tr><td align=\"center\">类型[");
      out.print(i);
      out.write("]<input type=TEXT name=");
      out.print(barType[i]);
      out.write(" value=\"类型");
      out.print((int)(Math.random()*NUMBER));
      out.write("\"> </td>\n");
      out.write("     <td align=\"center\">名称[");
      out.print(i);
      out.write("]<input type=TEXT name=");
      out.print(barName[i]);
      out.write(" value=\"名称");
      out.print(i);
      out.write("\"> </td>\n");
      out.write("     <td align=\"center\">数值[");
      out.print(i);
      out.write("]<input type=TEXT name=");
      out.print(barValue[i]);
      out.write(" value=");
      out.print(precision.format(Math.random()*100));
      out.write(" </td> \n");
      out.write(" ");
 } 
      out.write("\n");
      out.write("</table>\n");
      out.write(" <br>\n");
      out.write("         <input type=submit value=\"显示\">\n");
      out.write("         <input type=reset value=\"重置\">\n");
      out.write("\n");
      out.write("</form>\n");
      out.write("\n");
      out.write("</center>\n");
      out.write("<p align=\"right\"><a href=\"main.jsp\"> 返回</p>\n");
      out.write("\n");
      out.write("\n");
      out.write("</body>\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 + -