File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes file upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "file upload" Watch "file upload" New topic

file upload

Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
In my project I need to read a data from text file sent from the file at the client side and update database.
Problem I am facing is.
1. Should I store the file temporally in the server? (i.e., until it is updated to the database).
2. How to get the file from client to server.
Please give your valuable suggestion at the earliest.
Thanks in advance.

Sharing is learning
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
Use multipart requests for file upload.

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
use Oreilly classes or JSPSmartUpload. Remember that multipart forms are handled completely different. This is the reason you use these classes.

I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
Thank for the info.
I agree. Here's the link:
subject: file upload
It's not a secret anymore!