This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Upload JPEG file in a server using JSP and Servlet  RSS feed

 
Vikram Shirur
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....

I want to Upload a JPEG file from the client browser(using JSP) and store it into a ORACLE DB on the server.....

Can anyone help me.... How can this be done....

Thanks,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Apache Commons FileUpload package can handle the server side of the upload. This is really a job for a servlet, not a JSP. The http://faq.javaranch.com/java/FileUpload page has more information.

As to storing the image in a database, a BLOB field can be used. See this thread for a discussion of whether it's a good idea to store images in a DB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!