Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: PROGRESS BAR ON FILE READ

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Location
    Kochi,India
    Posts
    18
    My Mood
    Confused
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy 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


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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.

Similar Threads

  1. how to read file name inside .gz file....
    By kathir0301 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: December 6th, 2010, 10:06 AM
  2. how to read a PDF file?
    By epezhman in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: July 15th, 2010, 06:26 AM
  3. Monitor the progress of sending a file to client
    By adumi in forum Java Theory & Questions
    Replies: 0
    Last Post: April 17th, 2010, 07:01 AM
  4. [Swing-Progress Bar] Can't resize progress bar
    By Grabar in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 14th, 2010, 12:27 PM
  5. How to Read a Portion of a File in Java?
    By jazz2k8 in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: July 7th, 2009, 04:16 PM