• Post Reply Bookmark Topic Watch Topic
  • New Topic

User Notification Messages

 
Ramakrishna Goli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi good eve to all..

I have one doubt in servlets.. that is .. now i am trying to store data in database or opening new page. If suppose it will take sometime. so in this time i want to entertain user like showing some processing image or some any other image or pic.. whenever that is stored or opening new page, then that image/symbol is replaced by with new page..

example is, while loading data showing some symbol/ processing image when that background work completed then this image replaced with new page/data

can one help me..
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
410
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramakrishna,
You have two choices for approach.

1) Display a waiting page and referesh it every X seconds
2) Use AJAX and poll in the background.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
410
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the future, please try to use a more descriptive subject. This is the servlets forum. All questions are about servlets. For example, "user notification messages". I'll change it for you.
 
Ramakrishna Goli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s.. if i am displaying a waiting page then whenever the background process completed, how we notify and this waiting page automatically refresher/replaced with new data..


thanks.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you could do this?

Have your page submit to Servlet A
Servlet A sets things up for the processing, then forwards to a JSP page which does two things:

1. It displays a Please Wait message;

2. It automatically posts to Servlet B

Servlet B does the processing that was set up in Servlet A, then when finished, forwards to the final JSP view page, which will replace the Please Wait JSP page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!