Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to integrate progress bar between servlet and actionclass

 
Mohit Mehta
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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......
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • 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
 
rahul V kumar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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.
 
JothiKumar Ekanath
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic