PROGRESS BAR ON FILE READ
Hi folks.
I've a small problem. I am quite new to java. I am now developing an app. I am using the struts method.
Upon selection from menu, a jsp is used to upload a text file through a file selector. Then goes an calls a
java method to parse the text file and store in an Oracle 10g database. The program is working fine. But i want to add a progress bar during the read process. how to do it?
thnks in advance
Re: PROGRESS BAR ON FILE READ
Re: PROGRESS BAR ON FILE READ
The concepts in the link Kevin provided will be of use, but for a web app you won't be able to use the Swing components (in jsp). What you want isn't trivial, and you should look into using something like javascript and AJAX: a servlet (servlet 1) loads the file and updates a session variable - another servlet (servlet 2) outputs the percent from the session variable that servlet 1 updates. The AJAX access the percent from servlet 2 and updates the progress accordingly.