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

Storing images/files to database/ server folder  RSS feed

 
Arun Kumar S
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

In recent times i was into a matrimonial web-site development where i was asked to store images in to server-folder or directly into database.How to acheive this using jsp and how to retrieve back the files/images to html page.

Thanks...
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can handle file uploads on the server using the Jakarta Commons FileUpload library. Once the data is in your web app, you can use the java.io package to store them to the server file system, or JDBC (aka the java.sql package) to store them as BLOBs in the database.
I would strongly advise to do this in a servlet, not in a JSP page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!