You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a requirement that the WAR/EAR can't be modified from DEV to PRODUCTION.
So I need that the targetURI can be configured outside of the WAR/EAR.
For example, all the properties of the application is read from Linux FS : /apps/configuration/web/myApp.properties
Is it possible out of the box?
Can it be configured after the container startup? Any sample code to do that?
Project is not using SpringMVC.
The text was updated successfully, but these errors were encountered:
Yes,
The web.xml would have the absolute path (or classpath path) of the
property file.
The property name could be fixed, so that you can reference an existing
property file.
I had a similar problem where I needed to control the target URI programmatically and (probably overkill for what you want) dynamically at runtime. I solved this by extending the Proxy Servlet and, essentially:
Overriding getConfigParam() to ensure that P_TARGET_URI had a dummy value (so I didn't need to set this inside my JAR file but that the underlying base class didn't break)
Overriding rewriteUrlFromRequest() so that the new target request could be set programmatically (you can set this how you want in your own external property file, database etc.). For this latter bit, it was easiest to copy code from the base class and to amend as there's lots of useful logic in there.
Hi,
I've got a requirement that the WAR/EAR can't be modified from DEV to PRODUCTION.
So I need that the targetURI can be configured outside of the WAR/EAR.
For example, all the properties of the application is read from Linux FS : /apps/configuration/web/myApp.properties
Is it possible out of the box?
Can it be configured after the container startup? Any sample code to do that?
Project is not using SpringMVC.
The text was updated successfully, but these errors were encountered: