code: private void printConf(PrintWriter out, Reconfigurable reconf) {
      Configuration oldConf = reconf.getConf();
      Configuration newConf = new Configuration();
  
      if (reconf instanceof ReconfigurableBase)
        ((ReconfigurableBase) reconf).preProcessConfiguration(newConf);
  
      Collection<ReconfigurationUtil.PropertyChange> changes =
        ReconfigurationUtil.getChangedProperties(newConf,
                                                 oldConf);
      
  
  
      boolean changeOK = true;
  
      out.println("<form action=\"\" method=\"post\">");
      out.println("<table border=\"1\">");
      out.println("<tr><th>Property</th><th>Old value</th>");
      out.println("<th>New value </th></tr>");
      for (ReconfigurationUtil.PropertyChange c: changes) {
        out.print("<tr><td>");
        if (!reconf.isPropertyReconfigurable(c.prop)) {
          out.print("<font color=\"red\">" +
                    StringEscapeUtils.escapeHtml(c.prop) + "</font>");
          changeOK = false;
        } else {
          out.print(StringEscapeUtils.escapeHtml(c.prop));
          out.print("<input type=\"hidden\" name=\"" +
                    StringEscapeUtils.escapeHtml(c.prop) + "\" value=\"" +
                    StringEscapeUtils.escapeHtml(c.newVal) + "\"/>");
        }
        out.print("</td><td>" +
                  (c.oldVal == null ? "<it>default</it>" :
                   StringEscapeUtils.escapeHtml(c.oldVal)) +
                  "</td><td>" +
                  (c.newVal == null ? "<it>default</it>" :
                   StringEscapeUtils.escapeHtml(c.newVal)) +
                  "</td>");
        out.print("</tr>\n");
      }
      out.println("</table>");
      if (!changeOK) {
        out.println("<p><font color=\"red\">WARNING: properties marked red" +
                    " will not be changed until the next restart.</font></p>");
      }
      out.println("<input type=\"submit\" value=\"Apply\" />");
      out.println("</form>");
    }
docs: Print configuration options that can be changed.