code: public void writeHtml(JspWriter pOut, String pHtml) throws IOException {
          StringTokenizer parser = new StringTokenizer(pHtml, "<>&", true);
  
          while (parser.hasMoreTokens()) {
              String token = parser.nextToken();
  
              if (token.equals("<")) {
                  pOut.print("&lt;");
              }
              else if (token.equals(">")) {
                  pOut.print("&gt;");
              }
              else if (token.equals("&")) {
                  pOut.print("&amp;");
              }
              else {
                  pOut.print(token);
              }
          }
      }
docs: writeHtml ensures that the text being outputted appears as it was
  entered.  This prevents users from hacking the system by entering
  html or jsp code into an entry form where that value will be displayed
  later in the site.
  
  @param pOut The JspWriter to write the output to.
  @param pHtml The original html to filter and output to the user.
  @throws IOException If the user clicks Stop in the browser, or their
  browser crashes, then the JspWriter will throw an IOException when
  the jsp tries to write to it.