File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "uploading file" Watch "uploading file" New topic
Author

uploading file

santhoshkumar samala
Ranch Hand

Joined: Nov 12, 2003
Posts: 156

can any one tell how to upload a file in java
thanks in advance


santhosh<br />SCJP,SCWCD
Rajeev Asthana
Ranch Hand

Joined: Oct 27, 2003
Posts: 43
Originally posted by santoshkumar samala:
can any one tell how to upload a file in java
thanks in advance

Do you want to upload to a web server or to a machine connected on your LAN?
santhoshkumar samala
Ranch Hand

Joined: Nov 12, 2003
Posts: 156

Rajeev
here the case is To upload file on the webserver
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
The file upload widget on the HTML causes your browser to send a multipart request to the server. Mutlipart requests are non-trivial to read. If you're in a servlet environment, google on "OReilly multipart reader" and find their famous example. I just used this as a guideline to implement a multipart reader in a scratch-built web server. A fun exercise if you have the time.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: uploading file