package zr.zrpower.analyseengine.web.servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class StatisticsSubmitCompute
    extends HttpServlet {


  //Initialize global variables
  public void init() throws ServletException {
  }

  //Process the HTTP Get request
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws
      ServletException, IOException {
    response.setContentType("text/html; charset=GBK");
    request.setCharacterEncoding("GBK");

    try {
                StringBuffer sb = new StringBuffer();
                sb.append("<HTML>");
                sb.append("<HEAD>");
                sb.append("<TITLE></TITLE>");
                sb.append("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">");
                sb.append("<META http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">");
                sb.append("</HEAD>");
                sb.append("<BODY class=\"BodyMain\">");
                sb.append("<FORM name=\"recordfrm\" method=\"post\" Action=\"statisticscompute.do\">");
                sb.append("<input type=\"hidden\" name=\"ID\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"P1\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"P2\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"P3\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"P4\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"P5\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"USERTYPE\" value=\"\">");
                sb.append("<input type=\"hidden\" name=\"CONN\" value=\"\">");

                sb.append("</FORM>");
                sb.append("</BODY>");
                sb.append("</HTML>");
                response.getWriter().print(sb.toString());
    }
    catch (Exception ex) {
      response.getWriter().print(
          "<p>发生异常！</p><p>详细错误信息:</p><p>" +
          ex.toString() + "</p>");
    }

  }

  //Process the HTTP Post request
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws
      ServletException, IOException {
    doGet(request, response);
  }

  //Clean up resources
  public void destroy() {
  }
}
