I'm building a webapp for uploading content. At the moment, I'm using a properties file where I define some variables containing the path to some folders where I want the files to be stored. These paths refer to folders in my file system.
P1: Since I want to make my app more portable, I decided to store my uploaded contents in some folder inside the project classpath but the path I use in the placeholder is not working.
#path.images=C:/uploads/images #path.images=classpath:/webapp/uploads/images (NOT working) Q1: If it's possible, I would like to know if I'm storing the content in the right place (inside webapp directory).
NOTE: I'm making these changes also because I'm trying to replace the FileInputStream with the getResourceAsStream().
Any help will be much appreciated.
getResourceAsStream()since the Tomcat directory will finally point to somewhere likeC:\var\webapp\upload. To clarify a bit, this whole mess is related to this Primefaces issue: code.google.com/p/primefaces/issues/detail?id=3546