• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to upload an image through jsp

 
chaitanya Gali
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to upload an image using jsp.
for that i want to use browse button in the first page
then i want to upload the image using a jsp page into a folder.
how can i do this.
thanking you
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This kind of thing is hard to do in a JSP, as there is real coding to be done. So the page should submit to a servlet, where FileUpload will do the heavy lifting, and can then forward to the second JSP.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what ulf said is agreeable for me and suitable for that criteria.

click here on this article "Uploading Files with Bean" where bean is doing uploading task. hope it will help you to get the idea for doing this.
 
Naveen Kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chaitanya Gali

See the below Link..Source Code is there.. For Upload Process.

http://www.coderanch.com/t/291518/JSP/java/upload-file-jsp

Regards
Kumar
 
chaitanya Gali
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you kuamr
i will try to use it at my convenience.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic