Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Darla Morrison   on Nov 09 In Java Category.

  
Question Answered By: Taylor White   on Nov 09

you could save filename in db and then save filecontent in specific repository(folder) in root,
it means that you could save the name of your file into DB only.
and upload  file in the folder that you specify in the root for images,
when you wanna use it you should retrieve file name frim DB and image  url is static from your root folder. like this jsp sample :
<img src="/images/<%= rs("ImagesField")%>" border="0"/>

if you don't wanna do like this you could save content of your image in DB that is not recomanded, you should get binary of your file and then input to DB.
attention to your code  more.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Hibernate, BLOB(image): Retrieving images from DB(MySQL) Or get search suggestion and latest updates.


Tagged: