AnsweredAssumed Answered

How to add more properties to properties file

Question asked by vince20151 on Aug 30, 2013
Latest reply on Aug 30, 2013 by vince20151
I have a java backed webscript in alfresco (not share) that needs to connect to an external db. I like to keep the connection info (such as user, password, url) in a properties file rather than in the code. (e.g. mydb.username=admin, mydb.password=password123, etc..

1. Where and what file name should these properties be placed?
2. How to read these properties in my java file (snippet of code would be very helpful).

Updated for a change in requirement
Actually now, I have a need to share the properties among several java webscripts. Where is the appropriate place to place this file or modify an existing file and what would be the java code to read it? Thanks a bunch.

Outcomes