Announcement Announcement Module
No announcement yet.
image folder - where to put it? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • image folder - where to put it?


    I have a web app that allows users to upload images to the server. I want to keep the images in a folder, and the info about them in the db. I am using Tomcat 5.

    Where can I put this folder and how can I access it from jsp's? I guess the folder needs to be under webapps/appName in order to be able to use relative URLs to access them in the web pages. But on rebuilding the app, the whole directory is deleted (myEclipse). I might be able to prevent this, but a clean start on rebuilding is nice....

    I have tried putting the folder other places on the server and trying to access it by using a but keep getting FileNotFoundExceptions. I can't find much in the docs about how to use Resources.

    Where should I put this folder, and how can I access it?

    Thanks in advance,

    John Pedersen

  • #2
    If you need to be the file not accesible directly without any controller you can put it in e. g. "WEB-INF/images" directory.
    If you need to be accessed directly put it into e.g. "image" directory


    • #3
      The WEB-INF/images directory is destroyed on rebuild (by myEclipse).