You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chukwa.apache.org by ey...@apache.org on 2009/08/31 18:48:59 UTC
svn commit: r809657 - in /hadoop/chukwa/trunk: CHANGES.txt
src/java/org/apache/hadoop/chukwa/hicc/Iframe.java
Author: eyang
Date: Mon Aug 31 16:48:58 2009
New Revision: 809657
URL: http://svn.apache.org/viewvc?rev=809657&view=rev
Log:
CHUKWA-386. Fix a bug in echo id to the browser for the iframe servlet. (Eric Yang)
Modified:
hadoop/chukwa/trunk/CHANGES.txt
hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Iframe.java
Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=809657&r1=809656&r2=809657&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Mon Aug 31 16:48:58 2009
@@ -130,6 +130,8 @@
BUG FIXES
+ CHUKWA-386. Fix a bug in echo id to the browser for the iframe servlet. (Eric Yang)
+
CHUKWA-380. FTA shouldn't emit empty chunks. (asrabkin)
CHUKWA-378. Disable TestArchive unit test. (asrabkin)
Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Iframe.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Iframe.java?rev=809657&r1=809656&r2=809657&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Iframe.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Iframe.java Mon Aug 31 16:48:58 2009
@@ -13,17 +13,17 @@
public class Iframe extends HttpServlet {
public static final long serialVersionUID = 100L;
- private String id;
- private String height = "100%";
- private XssFilter xf = null;
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) {
- this.id = xf.getParameter("boxId");
+ id = xf.getParameter("boxId");
} else {
- this.id = "0";
+ id = "0";
}
response.setContentType("text/html; chartset=UTF-8//IGNORE");
response.setHeader("boxId", xf.getParameter("boxId"));
@@ -48,9 +48,15 @@
}
}
}
- out.println("<html><body><iframe id=\"iframe" + this.id + "\" " + "src=\""
- + source + "\" width=\"100%\" height=\"" + height + "\" "
- + "frameborder=\"0\" style=\"overflow: hidden\"></iframe>");
+ StringBuffer output = new StringBuffer();
+ output.append("<html><body><iframe id=\"iframe");
+ output.append(id);
+ output.append("\" src=\"");
+ output.append(source);
+ output.append("\" width=\"100%\" height=\"");
+ output.append(height);
+ output.append("\" frameborder=\"0\" style=\"overflow: hidden\"></iframe>");
+ out.println(output.toString());
}
public void doPost(HttpServletRequest request, HttpServletResponse response)