Results 1 to 9 of 9
  1. #1
    nnnnn is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default How to download file from apache tomcat server

    Hi ~
    I am doing this java web application that upload image file to the tomcat server, and splitting the image into chunks and then to upload to the server back.
    I was wondering anyone here have an idea on how to download back the files that are uploaded to the server back to my system.

    Thanks :confused:

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    how to download back the files that are uploaded to the server back to my system
    Use an HTTP GET to have the server send them to you.
    How are the files you want to download any different from any other file that you can download from a server. Wouldn't you use the normal method of downloading the files?

  3. #3
    nnnnn is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default

    Hey thanks for the speedy reply!
    I'm actually new to this, and I'm not that familliar with GET, which isit REST ? So I was wondering whether you could help me how to get along with this ? thanks =)

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    Need some info on what you are trying to do. You can use a browser to get the files.
    The HTTP I referred to is one of the protocols used between browsers and servers. Java programs also have classes that use this protocol. The GET command/request is used to retrieve files. All this is buried in the java classes.
    If you do a search here for HTTPConnection and Socket you'll get sample programs that get files from servers.

  5. #5
    gafa's Avatar
    gafa is offline Senior Member
    Join Date
    Jun 2010
    Posts
    107
    Rep Power
    0

    Default

    Hi use this tutorial

    Story of a Servlet: An Instant Tutorial

    + 1 my REP

    Good luck :)

  6. #6
    852000 is offline Member
    Join Date
    Jan 2010
    Posts
    8
    Rep Power
    0

    Default

    you can try to use a upload and download component which is called jspSmartUpload,
    first,you should download the jar file ,then add it into you project,so that you can use the Class Libaray of the jar which can implement the upload and download work.
    hope I can help you

  7. #7
    nnnnn is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default

    Thanks 852000 , gafa and Norm.
    I am doing a Java application, where you can upload image file to Apache Tomcat Server. But I do not know where is the image file stored after uploading to the server. Therefore, I am having problem locating the uploaded file, as I need to retrieve the file from the server. :confused:

  8. #8
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Did you write the code for uploading the files to the server?
    If you did then you would know where they were uploaded to. Otherwise you need to explain how you are doing the upload to the server.
    For downloading the file, just google "file servlet" and that should lead you to BalusC's file servlet page.

  9. #9
    gafa's Avatar
    gafa is offline Senior Member
    Join Date
    Jun 2010
    Posts
    107
    Rep Power
    0

    Lightbulb

    Quote Originally Posted by nnnnn View Post
    Thanks 852000 , gafa and Norm.
    I am doing a Java application, where you can upload image file to Apache Tomcat Server. But I do not know where is the image file stored after uploading to the server. Therefore, I am having problem locating the uploaded file, as I need to retrieve the file from the server. :confused:
    h-i-t

    Just System.out.println() your servlet to find this out ;)
    Watch the servlet java.io.*; classes to find the output stream is going to
    + 1 my REP
    Good Luck :)

Similar Threads

  1. Download File from the server
    By ersachinjain in forum Networking
    Replies: 10
    Last Post: 04-22-2010, 04:14 AM
  2. Replies: 3
    Last Post: 12-24-2009, 07:04 AM
  3. how to download file from ftp server
    By santhosh_el in forum Networking
    Replies: 0
    Last Post: 11-19-2009, 06:01 AM
  4. Replies: 1
    Last Post: 12-02-2008, 12:23 AM
  5. Apache Tomcat 6.0.16
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-29-2008, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •