[opencms-dev] Flush JSP output buffer in formatter
    Alexander Kandzior 
    alex at opencms.org
       
    Fri Dec 12 14:56:21 CET 2014
    
    
  
You may try to set the "cache" property to "stream" or "bypass". 
 
IIRC this needs to be set at the template JSP. I can't say if this features
works with formatters, I did not use this for a long time.
 
It still is in the code though:
 
https://github.com/alkacon/opencms-core/blob/branch_9_5_x/src/org/opencms/lo
ader/CmsJspLoader.java#L502
 
A short explanation in the documentation:
 
https://opencms.cse.unsw.edu.au/alkacon-documentation/documentation_flexcach
e/streaming.html
 
 
Kind Regards,
Alex.
-------------------
Alexander Kandzior
                                                              
Alkacon Software GmbH  - The OpenCms Experts                 
http://www.alkacon.com - http://www.opencms.org                  
 
 
 
 
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Kai Widmann
Sent: Friday, December 12, 2014 9:43 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Flush JSP output buffer in formatter
 
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
 
---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20141212/5eae28d8/attachment.htm>
    
    
More information about the opencms-dev
mailing list