The StringBuilder type is very usefull to use as a kind of output container. You can easily add Strings to the StringBuilder and print the content of the StringBuilder at once at the end of the process. I always use a StringBuilder when I have a JobDefinion which generates a html-page.
With the append() method, new Strings can be added to the StringBuilder. Use append("\n") to add the line-break.
USe the method toString() to print the content of the StringBuilder
{ StringBuilder htmlOutput = new StringBuilder(); // Write header of the html-page htmlOutput.append("" + "\n") ; htmlOutput.append("" + "\n") ; htmlOutput.append("Hello World" + "\n") ; htmlOutput.append("" + "\n") ; htmlOutput.append("" + "\n") ; jcsOut.println(htmlOutput.toString()) ; }