Package org.apache.hadoop.chukwa.util

Examples of org.apache.hadoop.chukwa.util.XssFilter


    this.SIZE_X = w;
    this.SIZE_Y = h;
  }
 
  public Heatmap(HttpServletRequest request) {
    XssFilter xf = new XssFilter(request);
    this.offline_use = false;
    this.request = request;
    HttpSession session = request.getSession();
    this.cluster = session.getAttribute("cluster").toString();
    String query_state = xf.getParameter("query_state");
    if (query_state != null) {
      this.query_state = new String(query_state);
    } else {
      this.query_state = new String("read");
    }
    String query_stat_type = xf.getParameter("query_stat_type");
    if (query_stat_type != null) {
      this.query_stat_type = new String(query_stat_type);
    } else {
      this.query_stat_type = new String("transaction_count");
    }
View Full Code Here


    resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
  }

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    xf = new XssFilter(request);
    response.setContentType("text/plain");
    String method = xf.getParameter("method");
    if (method.equals("get_views_list")) {
      getViewsList(request, response);
    }
View Full Code Here

    }
   
  }
 
  public Swimlanes(HttpServletRequest request) {
    XssFilter xf = new XssFilter(request);
    this.offline_use = false;
    this.request = request;
    HttpSession session = request.getSession();
    this.cluster = session.getAttribute("cluster").toString();
      String evt_type = xf.getParameter("event_type");
    if (evt_type != null) {
      this.shuffle_option = new String(evt_type);
    } else {
      this.shuffle_option = new String("noshuffle");
    }
View Full Code Here

  private boolean displayPercentage = false;
  private String[] seriesOrder = null;
  private XssFilter xf = null;
 
  public Chart(HttpServletRequest request) {
    xf = new XssFilter(request);
    if (request != null && xf.getParameter("boxId") != null) {
      this.id = xf.getParameter("boxId");
    } else {
      this.id = "0";
    }
View Full Code Here

      end = parseDateShorthand(endString);
  }
    }

  public void init(HttpServletRequest request) {
    xf = new XssFilter(request);
    Calendar now = Calendar.getInstance();
    this.session = request.getSession();
    if (request.getParameter("time_type") == null
        && session.getAttribute("time_type") == null
        && session.getAttribute("period") == null
View Full Code Here

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    String id;
    String height = "100%";
    XssFilter xf = null;
    xf = new XssFilter(request);
    if (xf.getParameter("boxId") != null) {
      id = xf.getParameter("boxId");
    } else {
      id = "0";
    }
    response.setContentType("text/html; chartset=UTF-8//IGNORE");
    response.setHeader("boxId", xf.getParameter("boxId"));
    PrintWriter out = response.getWriter();
    StringBuffer source = new StringBuffer();
    String requestURL = request.getRequestURL().toString().replaceFirst("iframe/", "");
    if(requestURL.indexOf("/hicc/")!=-1) {
       requestURL = requestURL.substring(requestURL.indexOf("/hicc/"));
    }
    source.append(requestURL);
    source.append("?");
    Enumeration names = request.getParameterNames();
    while (names.hasMoreElements()) {
      String key = xf.filter((String) names.nextElement());
      String[] values = xf.getParameterValues(key);
      if(values!=null) {
        for (int i = 0; i < values.length; i++) {
          source.append(key + "=" + values[i] + "&");
        }
        if (key.toLowerCase().intern() == "height".intern()) {
          height = xf.getParameter(key);
        }
      }
    }
    StringBuffer output = new StringBuffer();
    output.append("<html><body><iframe id=\"iframe");
View Full Code Here

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    String id;
    String height = "100%";
    XssFilter xf = null;
    xf = new XssFilter(request);
    if (xf.getParameter("boxId") != null) {
      id = xf.getParameter("boxId");
    } else {
      id = "0";
    }
    response.setContentType("text/html; chartset=UTF-8//IGNORE");
    response.setHeader("boxId", xf.getParameter("boxId"));
    PrintWriter out = response.getWriter();
    StringBuffer source = new StringBuffer();
    String requestURL = request.getRequestURL().toString().replaceFirst("iframe/", "");
    if(requestURL.indexOf("/hicc/")!=-1) {
       requestURL = requestURL.substring(requestURL.indexOf("/hicc/"));
    }
    source.append(requestURL);
    source.append("?");
    Enumeration names = request.getParameterNames();
    while (names.hasMoreElements()) {
      String key = xf.filter((String) names.nextElement());
      String[] values = xf.getParameterValues(key);
      if(values!=null) {
        for (int i = 0; i < values.length; i++) {
          source.append(key + "=" + values[i] + "&");
        }
        if (key.toLowerCase().intern() == "height".intern()) {
          height = xf.getParameter(key);
        }
      }
    }
    StringBuffer output = new StringBuffer();
    output.append("<html><body><iframe id=\"iframe");
View Full Code Here

  private String height = "100%";
  private XssFilter xf = null;

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    xf = new XssFilter(request);
    if (xf.getParameter("boxId") != null) {
      this.id = xf.getParameter("boxId");
    } else {
      this.id = "0";
    }
View Full Code Here

  private String user = "admin";
  private XssFilter xf = null;

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    xf = new XssFilter(request);
    response.setContentType("text/plain");
    PrintWriter out = response.getWriter();
    String method = xf.getParameter("method");
    if (method.equals("get_views_list")) {
      getViewsList(request, response);
View Full Code Here

  private boolean displayPercentage = false;
  private String[] seriesOrder = null;
  private XssFilter xf = null;
 
  public Chart(HttpServletRequest request) {
    xf = new XssFilter(request);
    if (request != null && xf.getParameter("boxId") != null) {
      this.id = xf.getParameter("boxId");
    } else {
      this.id = "0";
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.util.XssFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.