defining properties external to the web application

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

defining properties external to the web application

atitus
I am looking for a way to store properties outside of the application itself, so the application war file can be deployed in multiple environments without editing its contents first. 

I know that there is a properties-local.xml file, and that you can access these properties inside the xforms code using  xxforms:property.   My issue with this is that the properties-local.xml must exist INSIDE of  the web application, in WEB-INF/resources/config and there fore the contents of the war file have to be manipulated prior to deployment into another environment, and I really don't want to do that. 

Is there some way to use another method, like JNDI env entries or regular java properties files loaded from the class loader?  How could those items be accessed from within xforms?  

Thanks in advance for your suggestions,
Aaron

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: defining properties external to the web application

Alessandro  Vernet
Administrator
Hi Aaron,

If using Tomcat, in Tomcat's server.xml, you can add the following inside your <Context> for Orbeon Forms (if you don't have one, define it):

<Parameter override="false" name="oxf.resources.priority.0" value="org.orbeon.oxf.resources.
<Parameter override="false" name="oxf.resources.priority.0.oxf.resources.filesystem.sandbox-directory" value="/path/to/your/resources"/>

With this, Orbeon Forms will first look for resources in /path/to/your/resources. So you can create a /path/to/your/resources/config, and put the properties-local.xml in that directory. This way, there is really nothing inside the orbeon.war you need to change.

I hope this helps,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet