Static Resources

Every RAP application can host it's own static resources, like documents, scripts, images, or CSS-files. These can then be used for favicon, splash-screen, images in markup, within a browser widget, with the JavaScriptLoader or in any JavaScript-based custom widget. It is not necessary to register images used by CSS theming.

There are multiple ways to register a resource, with the main difference beeing the time and place the registration happens.

Important: To use the resource on the client (e.g. in a browser widget or the JavaScriptLoader), is it necessary to know it's public URL from the clients point of view. (The favicon in the application configuration/branding is an exception, here the path from the registration can be used). This information is in all cases provided by the ResourceManager:

String src = RWT.getResourceManager().getLocation( "foo/icon.png" );