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 5 of 5

Thread: Detecting File Download Completion

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Detecting File Download Completion

    Hi! I would just like to ask if it's possible for me to check the status of a file download using jsp/javascript.
    I have a jsp page with a button, which when clicked, opens a 'Save As' dialog box for downloading a file from the server (file content is retrieved from db). I want to refresh or redirect my page after the download is complete. Is that doable?

    Thanks in advance, any help will be greatly appreciated.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Detecting File Download Completion

    Hello fedfan, welcome to the forums.

    I don't think it is possible to check the status of a downloaded file using JSP. As far as i'm aware, there is no built in process to check to see if the download is complete.

    Hopefully someone else here will be able to prove me wrong...
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Detecting File Download Completion

    Ok thanks JavaPF!

  4. #4
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Detecting File Download Completion

    Follow up question: Is it possible at all for me to know the path of the local directory where the client chose to save the downloaded file?

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Detecting File Download Completion

    Quote Originally Posted by fedfan View Post
    Follow up question: Is it possible at all for me to know the path of the local directory where the client chose to save the downloaded file?
    I don't think this is possible I guess the only way to do it would be for the user to enter the location manually.

    Sorry I can't be of more help! Please let me know if you find a solution.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. How to Download a file via FTP
    By JavaPF in forum Java Networking Tutorials
    Replies: 1
    Last Post: December 24th, 2011, 11:56 AM
  2. [SOLVED] Detecting whether the piece of code is executing?
    By vivek1982 in forum Web Frameworks
    Replies: 4
    Last Post: March 27th, 2009, 06:17 AM