我尝试从OrbeonForms版本3.8升级到3.9。我正在使用PriorityResourceManagerFactory
,如下所示:
<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>
我在page-flow.xml中有条目:
<files path-info=".+\.(gif|css|pdf|json|js|png|jpg|xsd|ico)"
matcher="oxf:perl5-matcher"/>
在我的目录中,我保留了整个应用程序代码,并且我有 theme / styles / layout.css 文件。在Orbeon 3.8中,服务器路径/orbeon/theme/styles/layout.css
运行良好,但不是3.9。
如何配置它以保持向后兼容性?
答案 0 :(得分:0)
我假设/orbeon
是您部署Orbeon Forms网络应用程序的上下文。
如果您使用的是Orbeon Forms PE,从3.9版本化资源开始enabled by default,浏览器请求的路径必须为/orbeon/3.14/theme/styles/layout.css
,其中3.14
为应用版本。如果您在代码中编写/theme/styles/layout.css
,Orbeon Forms会自动为您重写,并在其发送到浏览器的HTML中添加版本号。
自3.9以来,default app path is prepended when looking up resources。因此,对具有版本化资源的/orbeon/3.14/theme/styles/layout.css
或没有版本化资源的/orbeon/theme/styles/layout.css
的请求将在资源目录中查找文件app/theme/styles/layout.css
。所以你需要:
theme
目录下移动app
。)theme
添加为平台路径,方法是将其添加到oxf.url-rewriting.platform-paths
property。很可能这是对你最有意义的选择。