code: protected static String render(final WebComponent component) {
  		StringWriter stringWriter = new StringWriter();
  		PrintWriter printWriter = new PrintWriter(stringWriter);
  		component.paint(new WebXmlRenderContext(printWriter));
  		printWriter.flush();
  		String content = stringWriter.toString();
  		return content;
  	}
docs: Renders the given component to a web-XML String and returns it. This occurs outside the context of a Servlet.
  
  @param component the component to render.
  @return the rendered output as a String.