Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

images in workspace  RSS feed

 
Bharat Sankannanavar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,
As my requirement I am storing the image link in database and through that link I need to access the image in the webpage. For this, I am storing images in my workspace. But the problem is, since my workspace is in C drive, I dont want to store those images in workspace because of the space matter. Can I store those images outside C drive and save the link in database? After that how can I access those in webpage?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The image must be in the web app itself if it is to be directly addressed. Otherwise, there needs to be a resource in the web app (likely a servlet) that can read the file stored elsewhere and stream it as a response. The latter has lots of examples you can search for.
 
Anindya Roy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upload the images to the directory in the web app using some random unique image names and save the image name in the database so that when you want to display the images, you retrieve the image name from the db and using this image name you retrieve the image from the directory and display it on the page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!