• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to integrate progress bar between servlet and actionclass

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have one problem..
I my project i have action class which do some heavy business logic and takes time to forward to next view (.jsp)
So for that i want to add progess bar in between can anybody suggeste me how can i show real time progress bar and same time i can continue running my action class business logic.

Thanx in advance for quick idea plz......
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Real time? Nope. You'd need a SocketConnection for that and good ol' html over http doesn't support it.

You could fake it with a wait page (search the past threads for this topic) that keeps resending an "Are-we-there-yet?" kind of request to the Action. If the Action knows how far along it is in processing it could send a percentage number to be displayed on the next instance of the jsp wait page. That's a lot of extra network traffic though to send it back and forth so much.
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a similiar question.

I have a page that does a search of a database and returns the first 100 or so, is there a way to have it display the first 100 results but to keep getting the rest of the results and to "cache" them? So they're available after hitting something like "view next 100"?


-Tad
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can checkout this link

http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html

They implement progress bars. maybe you can get some idea from there.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is it a best approach to start a new thread from the action class where i do time consuming operation in that thread and return.By this time what should be done to the main thread that called the action class.

1.Wait 2.return to a status page,after creating child thread

I am just confused,will this work if the number of users are more
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic