Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Prevent loading until .jsp page is finished processing  RSS feed

 
Ranch Hand
Posts: 249
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to prevent a .jsp page from loading until after the entire page has been processed?

Here is the problem: Our web based app accesses a data base, and sometimes when there is a lot of data being returned, parts of the page (including images with links) appear before all the data has been processed and displayed. Sometimes impatient users will click these links which require data being returned. This really messes things up.

Any ideas/suggestions would be appreciated.

Thanks in advance.
 
Marshal
Posts: 67191
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow conventional accepted practices and perform all your processing up-front in a servlet controller which forwards to a JSP page to render the view after all the processing is complete.
 
author
Posts: 4096
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're talking about preventing the output of a jsp until it is finished, not the loading. What you're describing is a form of auto-flushing. In the alternative, you can call out.flush() manually in order to send data to the user while processing is still going on.

In other cases, flush() is called automatically depending on the server settings such as if the buffer becomes too large or the page has finished loading. You can disable this feature by setting the page context autoFlush parameter to false. That should solve you're problem but you may need to manually call flush at the very end of processing of the JSP to re-enable the flush.
[ December 15, 2005: Message edited by: Scott Selikoff ]
 
You showed up just in time for the waffles! And this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!