XInclude seperate deployment

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

XInclude seperate deployment

Vedha
In the seperate deployment , where orbeon will be independent of the XForm files and all XForms code will be available inside our application. How can we xinclude some files?

When i try to xinclude some files using <xi:include href="oxf:/sample.xml"/> then, it is trying to look this sample.xml file inside orbeon and not inside application war. It is working when i keep the sample.xml inside orbeon. It is not working when i place the file inside app.

I have also tried this,

<xi:include href="http://localhost:8080/XFormsAs/sample.xml"/>

Still getting file not found error. But able to access sample.xml in browser "http://localhost:8080/XFormsAs/include.xml"

My question would be, how to Xinclude in seperate deployment? When all the XForms and the file to be xincluded will be available only inside application.
Reply | Threaded
Open this post in threaded view
|

Re: XInclude seperate deployment

Alessandro  Vernet
Administrator
Hi Vedha,

Indeed, with a oxf:/ URL, Orbeon Forms will load the file as a resource, and by default look under WEB-INF/resources in the Orbeon Forms war. I think I would tell Orbeon Forms about a new resource directory, which is outside of the war. With Tomcat, you can do so by adding the following inside the <Context> element, in Tomcat's server.xml:

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

Obviously, in the above changing "/path/to/you-resources-dir" as necessary. Then, if you reference oxf:/sample.xml, Orbeon Forms will look for it under /path/to/you-resources-dir/sample.xml. Would this work in your scenario?

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