ServletException {
HttpSession session = environment.getSession(req, res);
if(session == null) // No session? Probably the authentication failed...
return;
LabelResource labels = environment.getLabelResource(session);
String lang = environment.getLanguage(session);
res.setContentType(environment.getContentType());
PrintWriter out = res.getWriter();
try {
Table menuBar = menuGenerator.getMenuBar(
MENU_NAME,
null,
MENU_BG_IMAGE,
MENU_SPACER_IMAGE,
lang);
Head head = new Head().addElement(new Link()
.setRel("stylesheet")
.setType("text/css")
.setHref("smilemenu.css"));
menuGenerator.createMenu(MENU_NAME, head, StandaloneEnvironment.standaloneZones, lang);
TD logoCell = new TD()
.setVAlign(AlignType.TOP)
.setBackground(TOPBAR_BG_IMAGE)
.addElement(new IMG("pics/logo_smilehouse.gif"));
TR topRow = new TR().addElement(logoCell).addElement(
new TD().setBackground(TOPBAR_BG_IMAGE)).addElement(
new TD().setBackground(TOPBAR_BG_IMAGE).setAlign(AlignType.RIGHT).addElement(
new Span().addElement("OpenSyncro " + OPENSYNCRO_VERSION).setClass("syncroTitle")));
TR menuRow = new TR().setVAlign(AlignType.TOP).addElement(
new TD().setBackground(MENU_BG_IMAGE).setVAlign(AlignType.BOTTOM).addElement(
menuBar)).addElement(
new TD()
.setBackground(MENU_BG_IMAGE)
.setAlign(AlignType.RIGHT)
.setColSpan(2)
.addElement(
new Span().addElement(
new A("Login?logout=yes", "[" + labels.getLabel("logout") + "]")
.setTarget("_top")).setClass("syncroText")));
Body body = new Body().addElement(new Table()
.setWidth("100%")
.setBorder(0)