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

uploading a file

jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
any idea how do we allow users to upload their files using JSP..
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
jyotsana -
just go to the search link and you will find tons of information related to it. This topic is very popular here.

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

Joined: Aug 17, 2001
Posts: 399
In brief, I would say, checkout JSPSmart Upload & com.oreilly components.

Malhar Barai
SOA & Java Book
Ajith Pande

Joined: Nov 10, 2003
Posts: 2
Uploading file into hard drive is very simple
here some sample code
---------------in jsp--------------
<input type=file name=...>
---in java-----------
import com.oreilly.servlet.MultipartRequest, file = multipartRequest.getFile("file");
//here u need not to create that file, it wll create itself .it jsut like coping file
//and one more thing pls put cos.jar file into lib dir and add it to classpath
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: uploading a file
It's not a secret anymore!