access to .properties file in .war file deployed in weblogic 12c

0

I have a file .properties in which I send certain parameters so that certain functions are executed in my application.

What I would like to know is:

Is there any way to access this .properties file, edit it and save it, without having to access the source code and replicate the war to weblogic?

That is, modify it already deployed at runtime.

    
asked by Jdeveloper 02.02.2017 в 14:18
source

1 answer

0

To update a file .properties , contained in a .WAR , deployed in a server of applications WebLogic are the following, you only need to have what next:

  • .WAR file displayed in OK status.
  • Have WinRar installed.

Steps:

  • Select the application and stop requests.
  • Go to the directory in which the application is deployed, make a copy, and paste in the local user directory in Windows .
  • Open said file with WinRar , once opened, go to the default path where the file .properties is found, in this case, WEB-INF\CLASSES\“nombreArchivoProperties.properties” , open the file with any editor of text, modify parameters and save.
  • After editing the file, copy the .WAR where the modifications were made, and paste it in the path where the .WAR was originally obtained described in step 2.
  • Go to the administration console, select the application, click on the option "Update" , confirm that the source path is the same as the one where you paste the new file .WAR modified, once, confirmed, click on "Finish" , wait for it to update.
  • Once updated, start application serving all the requests and in this way our file .properties is updated.
  • answered by 08.02.2017 в 14:44