The Resource Server is a collection of libraries and a web application geared towards more efficient inclusion of static resources such as CSS and JavaScript in Java web applications. Shared resources such as jQuery releases are included in the web application under a well defined, versioned URL with browser-side caching headers and gzip compression applied. A Maven plugin provides for JS and CSS minification and aggregation, combining many small files into a single uniquely named file to allow for browser-side caching. JSP tags allow for easy, automatic use of these aggregated files and files from the Resource Server web application when it is available and fail gracefully when it is not.
The end goal of these utilities is to reduce the number of distinct resource URLs the browser has to retrieve content from for any given page and to take advantage of browser side caching to reduce the number of requests the browser has to make.
The resource server is made of of four main components.
The web application deployed with uPortal since the 3.1 release which provides:
A Maven plugin which aggregates and compresses JavaScript and CSS into a minimal set of files with unique file names to allow for aggressive browser-side caching.
Utility library used by various components for common functionality
WAR packaged artifact that contains all of the static content available from the Resource Server Web Application. Used with Maven WAR Overlay support to include the resources used by the web application locally so that fall-back works correctly if the Resource Server Web Application is not available.