Server independent reference in an XPages theme

后端 未结 4 1335
别那么骄傲
别那么骄傲 2020-12-20 12:27

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.

how do I genericize http://w

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 13:13

    Another option is to investigate the XSP Starter Kit on OpenNTF.org

    This will allow you to build an OSGi plugin library for XPages and one of the starter examples that you can extend in the library shows you how to create your own resourceProvider service.

    Depending on how you refactor the XSP Starter Kit to your own name space you would be able add your css and other files ( common icons, logos etc ) and then you can access them using your own file path of /.ibmxspres/.yourNameSpace/file.ext. You can even build your own directory structure in the library to make managing the files easier.

    One big advantage of this over storing them in a NSF is that they are cached by the end users browser whereas files served via nsf are not always cached.

    Also, if the library is set as a global library on the server then you don;t need to add a dependency to the calling application, the resource provider will be available for anything that needs it.

提交回复
热议问题