Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSP and the fly likes File upload  from Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "File upload  from Jsp" Watch "File upload  from Jsp" New topic

File upload from Jsp

Prashant Medhekar

Joined: Nov 17, 2009
Posts: 4
Hi everyone,
i want to upload a file from a Jsp page.The action of the page will take the file to a servlet.
This servlet will save the file in database.

Can anyone tell me how to achieve this.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Welcome to JavaRanch.

The server side of a file upload can be handled be the Apache Commons FileUpload library.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63839

There's a FAQ entry on this very subject.

[Asking smart questions] [About Bear] [Books by Bear]
Piyush Patel
Ranch Hand

Joined: Feb 24, 2009
Posts: 127

check out following link for uploading file from JSP

i used this library in my project , it works.

Thanks :-)
I agree. Here's the link:
subject: File upload from Jsp
It's not a secret anymore!