EventManagerLocal eventManager = LookupUtil.getEventManager();
Subject subject = WebUtility.getSubject(request);
EventsForm eForm = (EventsForm) form;
EventComposite comp = eventManager.getEventDetailForEventId(subject, eventId);
StringBuffer buf = new StringBuffer();
buf.append("<div title=\"Details for Event " + eventId + "\">");
buf.append("<b>Source: </b>");
buf.append(htmlFormat(comp.getSourceLocation(), eForm.getSourceFilter()));
buf.append("<p/>\n");
buf.append("<b>Full detail: </b><br/>\n");
buf.append(htmlFormat(comp.getEventDetail(), eForm.getSearchString()));
buf.append("</div>");
Writer w = response.getWriter();
w.append(buf.toString());
w.flush();