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
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.