public void prepare(HttpServletResponse aResponse) throws EventServiceException {
myResponse = aResponse;
try {
myOutputStream = aResponse.getOutputStream();
} catch(IOException e) {
throw new EventServiceException("Error on using output stream of the response!", e);
}
myResponse.setContentType("text/html;charset=" + getEncoding());
myResponse.setHeader("expires", "0");
myResponse.setHeader("cache-control", "no-cache");
myResponse.setHeader("transfer-encoding", "chunked");