PrintWriter out,
HttpSession session) throws Exception {
String lang = (String) session.getAttribute(SESSION_LANGUAGE_ATTR);
Body body = getBody();
Head head = new Head().addElement(
new Meta().setHttpEquiv("Content-Type").setContent(getContentType())).addElement(
tabGenerator.getStyle()).addElement(
new Link().setRel("stylesheet").setType("text/css").setHref("smilestyle.css"));
if(toHead != null)
head.addElement(toHead);
Document doc = new Document().setDoctype(new Doctype.Html40Transitional()).setHtml(
new Html().addElement(head).addElement(
body.addElement(tabGenerator.getTabSet(tabSetId, tabId, new ElementContainer()
.addElement(content), MENU_FILE, standaloneZones, lang))));
doc.output(out);
}