Is there any recommended Java library for generating HTML code programatically?
For example, I'd like to do something like this:
// Creates table with 1 row and 2 columns
HTMLTable table = new HTMLBuilder().getHTMLTable(1, 2);
// Sets the table contents
table.setCell(0,0, "abc");
table.setCell(0,1, "def");
String html = table.getHTML();
HTMLTable and HTMLBuilder are classes that the library would provide.