What is the best place to store a configuration file in a Java web application (WAR)?

后端 未结 6 1596
猫巷女王i
猫巷女王i 2020-12-23 01:54

I create a web application (WAR) and deploy it on Tomcat. In the webapp there is a page with a form where an administrator can enter some configuration data. I don\

6条回答
  •  难免孤独
    2020-12-23 02:35

    I would not store it in the application folder, because that would override the configuration with a new deployment of the application.

    I suggest you have a look at the Preferences API, or write something in the users folder (the user that is running Tomcat).

提交回复
热议问题