Discussions

General J2EE: create and access a custom properties file??

  1. Due to a business case, we need to create a properties file and update it when needed.

    If it is a non-generic properties file, where can I locate the property file??(we use weblogic as the app server).

    Is it suggested to access files and update them in J2EE(if the updates and access are done on the server side)???
  2. Due to a business case, we need to create a properties file and update it when needed.
    Should this data realy be in a properties file and not the database?
    If it is a non-generic properties file, where can I locate the property file??(we use weblogic as the app server).
    I would define a directory to store the files in, say (/opt/properties or C:\MyApp\properties). And give the weblogic owner write/read for just this directory.
    Is it suggested to access files and update them in J2EE(if the updates and access are done on the server side)???
    Sure, this is done by the container all the time. Just make sure you don't introduce any security bugs.
  3. we can not use db stuff, since we are not supposed to create a new table(we don't have a table for this kind of purpose). That is why we are choosing a text file to take care of this.