• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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.
 
Author and ninkuma
Marshal
Posts: 66820
168
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
Bartender
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!