I trying to upgrade from OrbeonForms version 3.8 to 3.9. I’m using PriorityResourceManagerFactory as follows:
<context-param>
<param-name>oxf.resources.factory</param-name>
<param-value>org.orbeon.oxf.resources.PriorityResourceManagerFactory</param-value>
</context-param>
<!-- Uncomment this for the filesystem resource manager -->
<context-param>
<param-name>oxf.resources.priority.1</param-name>
<param-value>org.orbeon.oxf.resources.FilesystemResourceManagerFactory</param-value>
</context-param>
<context-param>
<param-name>oxf.resources.priority.1.oxf.resources.filesystem.sandbox-directory</param-name>
<param-value>d:/Sources/esb-repository/user-interface</param-value>
</context-param>
<context-param>
<param-name>oxf.resources.priority.2</param-name>
<param-value>org.orbeon.oxf.resources.WebAppResourceManagerFactory</param-value>
</context-param>
<context-param>
<param-name>oxf.resources.priority.2.oxf.resources.webapp.rootdir</param-name>
<param-value>/WEB-INF/resources</param-value>
</context-param>
<context-param>
<param-name>oxf.resources.priority.3</param-name>
<param-value>org.orbeon.oxf.resources.FilesystemResourceManagerFactory</param-value>
</context-param>
<context-param>
<param-name>oxf.resources.priority.3</param-name>
<param-value>org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory</param-value>
</context-param>
I have entry in page-flow.xml:
<files path-info=".+\.(gif|css|pdf|json|js|png|jpg|xsd|ico)"
matcher="oxf:perl5-matcher"/>
Within my directory I keep whole application code and I have file theme/styles/layout.css. In Orbeon 3.8 server path /orbeon/theme/styles/layout.css works perfectly, but not in 3.9.
How to configure it to keep backward compatibility?
I’ll assume
/orbeonis the context on which you deployed the Orbeon Forms web app.If you’re using Orbeon Forms PE, starting with 3.9 versioned resources are enabled by default, the path requested by the browser needs to be
/orbeon/3.14/theme/styles/layout.css, where3.14is the app version. If you write/theme/styles/layout.cssin your code, Orbeon Forms will automatically rewrite it for you, adding the version number in the HTML it sends to the browser.Since 3.9, the default app path is prepended when looking up resources. So a request for
/orbeon/3.14/theme/styles/layout.css, with versioned resources, or/orbeon/theme/styles/layout.csswithout versioned resources, will look for the fileapp/theme/styles/layout.cssin your resource directory. So you need to either:themeunder theappdirectory).themeas a platform path, by adding it to theoxf.url-rewriting.platform-pathsproperty. Most likely this is the option that makes the most sense for you.