aspose file tools*
The moose likes JSP and the fly likes Make upload and download a file facility in a project. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Make upload and download a file facility in a project." Watch "Make upload and download a file facility in a project." New topic
Author

Make upload and download a file facility in a project.

thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

I've test papers(.xls) in jsp to be uploaded and students will be submitting back after solving them.
I shall be able to test this uploading or downloading facility without any internet connection. How do I start for it?

I've heard about FTP servers, but they say they need a ftp server url, username and password? Where do I get them? how's that possible without any ftp server, at least on a local machine.? Is this a right way?
How do I make it then? Please help.



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Not sure what this has to do with JSP. But how do you want to perform the upload? HTTP? FTP? Other?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

Oh sorry about that colors. My mistake.

Actually I've been using Apache Tomcat as a container for Servlets n JSPs in my project. I need a simple client-server file upload and download.
Which one is simplest? FTP? HTTP? or any other?
According to my JSPs and Servlets in the project, anything simpler but smarter and robust will do it.
Please suggest me any of it?

I have heard FTP requires own FTP server and all, is it so? I would prefer a open-source/free file uploading type.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

FTP requires its own server. If you are planning to do this within a web app, HTTP is the protocol.

See the JSP FAQ for an entry on file uploading.
thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

Thanks for the reply Bear Bilbeault.
Would you tell me one thing about FTP?
Can I make my FTP server on localhost( same machine) and then to test FTP file uploading assuming client and server are (for now) on my same machine??
and yes, I'm developing a web application, so HTTP might be useful and simple, right? I'll read FAQs for File-uploading. then will come back if any problem comes.
thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

Okay, I read the FAQs and its useful, I got the ways to upload.
I loved the HTTP protocol method, I got some sample codes to work for using Apache Commons Upload Library. and I make it work in my program successfully.
But what about using FTP server? If I would try FTP way,

is it possible to try this url for my local/same machine. What are its basic requirements of FTP then?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Why would you use FTP within a web app?
thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

Oh I'm sorry. I don't know much clear about where FTP can be used. I guessed some possible options about how a file can be uploaded in web app.
Would you tell where FTPs are generally used? I can guess about HTTP as it can be used in a web app.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

FTP is usually used as a command line client, or with a GUI client (Transmit, Fetch, BulletProof, etc)
thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

o.k., so that's the story of FTP.. I'll go for exploring it other time, as now I'm dealing with a web app here, HTTP will suit it for facilitating it with upload using Apache commons upload library. I'll read whole tutorial of it and will implement it in the web app.
Thank you very much Sir Bear Bibeault for your precious guideline and time. Have a nice day.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Make upload and download a file facility in a project.