[opencms-dev] Flush JSP output buffer in formatter

Kai Widmann Widmann at mediaworx.com
Fri Dec 12 09:42:49 CET 2014


Hello there,

I'd like to find out if there is a way to flush the JSP output buffer to the user's browser in a formatter jsp.
I have a situation where I have a very long search result list that's coming from an external web service and it only gets flushed after the whole page is rendered, but I'd like to flush after say five or ten result rows.
I've tried about every flushing method known to me, none of them did do any good.
Here are some of the things I tried:

  out.flush();
  flexController.getCurrentResponse().flushBuffer();
  flexController.getCurrentResponse().getOutputStream().flush();
  flexController.getCurrentResponse().getWriter().flush();
  flexController.getTopResponse().flushBuffer();
  flexController.getTopResponse().getOutputStream().flush();
  flexController.getTopResponse().getWriter().flush();

Any ideas?
Does anyone know how OpenCms handles the rendering of formatters internally?
Is there any way at all to flush formatter output during rendering?

Cheers

Kai

P.S.: I know that something like this could easily be done using AJAX and lazy loading. But let's just assume I'm not allowed to use AJAX.

_______________________________________________

Kai Widmann
mediaworx berlin AG

Fon (0 30) 2 75 80 - 262
Fax (0 30) 2 75 80 - 200

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20141212/22f02951/attachment.htm>


More information about the opencms-dev mailing list