how to show processing status of transaction or work at server side in a browser for end user?

左心房为你撑大大i 提交于 2019-12-13 04:46:23

问题


         ____
        ----- > 60% completed

the above type of some processing status i want to show the user in a web browser when these is some transaction is going.

For example im creating some tables say 1000 show i do not want to get disturb by user when some thing is going on. so for that i need to show user the status ( no. of tables created so far on the browser in a gui manner) . give me some idea to do that. in advance for ur comments and answers.

Note : while copying some data , we can see these types of graphics in windows. here i coudnt give some picture of it. hope u got what i am looking for.


回答1:


One possibility: Use Ajax to call the servlet that will do the processing and initialize it doing its work. Have the servlet doing the processing update a status in some database table tied to the userid/sessionid as it does the processing (or use the session object for this). Poll another servlet with Ajax to retrieve the status from that table (or session object).



来源:https://stackoverflow.com/questions/19454488/how-to-show-processing-status-of-transaction-or-work-at-server-side-in-a-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!