Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.
/ webresource Public archive
forked from everit-org/webresource

An extender component to be able to serve static resources (css, javascript, gif, ...) via http

License

Notifications You must be signed in to change notification settings

jgielstra/webresource

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webresource

Introduction

Webresources are small static files that are downloaded during rendering a website. E.g.: CSS, Javascript, images, ...

The Extender Component

There is an Extender component with the following configuration option:

  • alias: Coming from whiteboard pattern. This is the alias where the registered servlet that serves the resources will listen.

Capability

The extender picks up every bundle that has the "everit.webresource" capability. The capability can have the following attributes:

  • resourceFolder: The folder in the bundle where the resources are located

  • libraryPrefix: A prefix that should be pasted in front of the folder structure in the URL.

  • version: Optional attribute that can define the version of the webresources. If not defined, the version of the bundle will be used.

Version handling

The webresource_version can be specified as a parameter of the servlet request. Using ranges in the version expression is allowed. Examples:

  • /alias/jquery/jquer.js?webresource_version=2.1.0
  • /alias/jquery/jquer.js?webresource_version=[2.1.0,3)

WebResourceLocator

Not implemented yet

Cache

There is a primitive, in-memory cache. The GZIP, Deflate and RAW data is stored in cache after the first request. When a bundle is stopped, all webresources are removed from the cache that came from that bundle.

WebConsole Plugin

There is a WebConsole plugin that is registered when the Extender component is started. It shows the registered webresources and the state of the caches.

Content-Encoding

GZIP, Deflate and RAW content encodings are supported.

ETag support

SHA-256 hash of the RAW content is concatenated with the last modification date of the webresource file.

About

An extender component to be able to serve static resources (css, javascript, gif, ...) via http

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.7%
  • CSS 1.3%