XPage 主题中的服务器独立引用 [英] Server independent reference in an XPages theme

查看:23
本文介绍了XPage 主题中的服务器独立引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在主题中有以下内容,但我想让它独立于服务器,以便它可以无缝地从开发到测试再到生产.

I have the following in the theme but I want to make it server independent so that it can be moved seemlessly from deve to test to prod.

如何泛化http://www.devserver.com?

<resource>
    <content-type>text/css</content-type>
    <href>http://www.devserver.com/CommonElements.nsf/commonMAX.css</href>
</resource>

我会假设以下 - 但不起作用,因为它使引用相对于当前的 .nsf

I would assume the following - but doesn't work as it makes the reference relative to the current .nsf

<resource>
    <content-type>text/css</content-type>
    <href>/CommonElements.nsf/commonMAX.css</href>
</resource>

推荐答案

来自 文章 上的注释 &Domino 应用开发维基:

From an article on the Notes & Domino App Dev wiki:

"当 XPage 运行时发出 URL 时,它假定根 "/" 是应用程序的根(例如/mydb.nsf).但由于浏览器中不存在此概念,因此添加了JSF 运行时.要解决此问题,请将语法 "/.ibmxspres/domino" 添加到路径的开头,以将根设置为 Domino 数据目录."

"When the XPages runtime emits a URL, it assumes that the root "/" is the root of the application (e.g. /mydb.nsf). But as this notion doesn't exist in the browser, this is added by the JSF runtime. To work around this add the syntax "/.ibmxspres/domino" to the beginning of the path to set the root as the Domino data directory."

这篇关于XPage 主题中的服务器独立引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆