JSP进度栏 [英] JSP Progress Bar
问题描述
我在这里找到了一个很好的教程 http://onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html ,但似乎没有什么过时的。
有没有任何新的和简单的方法来实现?
通常对于一个网络应用程序,如果你想要进度条,然后去AJAX路线是最好的,像上面提到的一些海报。
然而,我发现,在网络上,适合向用户指出 正在发生。只有在提交页面时,可以看到某种类型的微调框,然后在呈现页面时再次隐藏(请参阅此处 强>)。这是非常容易做到的,不会导致额外的性能下降,并且表明某种进展
Is there a quite easy way to implement progress bars in JSP. Basically I have a JSP page that goes to a servlet that calls up a method, now this process is going to run for a long time and I want to indicate the status of the progress just like the progress bar that shows up in the eclipse taskbar when we execute any java program.
I have found a nice tutorial here http://onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html but it seems little outdated.
Are there any new and easy ways to implement this?
Determining the progress of a particular task is a surprisingly complicated thing once you get into the details. How do you determine for example that you are 50% done? And what happens if the last 10% of your task takes 1/2 the total time?
Usually for a web app, if you do want progress bars, then going the AJAX route is best, as some of the posters mentioned above. I find, however, that on the web, it is suitable to indicate to the user the something is happening. Just have a spinner of some sort made visible when the page is submitted, and then hidden again when it is rendered (see here). This is very easy to do, causes no additional performance hit, and is indicative of some sort of progress
这篇关于JSP进度栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!