Home
Copyright visola, all rights reserved.
The ResourceManager is composed by one ContextListener that holds all resources that were already loaded and processed. It is also responsible for loading new resources needed.
Loaders are used to load resources from any place. This module comes with two implementations: WebApplicationFileLoader and ClasspathLoader. The first one loads resources contained in the application directory. The second loads resources that were added to the classpath (through a jar or whatever).
To add a new Loader to the application, just implement the interface and set it up as a service.
Before being handled to the servlet resources can be processed (compressed, obfuscated, etc.) by Processors. Processors can also be registered as services and will be loaded automatically just by adding them to the classpath. No processor is included in this module.
Another feature that was added to this module is a tag that configure a link to the servlet automatically. In the last two screenshots there is an example of how to use it and what is generated.
Step 0 - This module depends on the Jackson JSON Processor to create JSON outputs. Download and add it to your project before continuing.
Step 1 - Add the jar that comes inside the zip file into your WEB-INF/lib directory.
Step 2 - Configure the ResourceContextListener just add a listener element to your web.xml file:
Step 3 - Add the servlet and servlet mappings:
That's it, you can start using it!
Copyright visola, all rights reserved.
Questions & Comments
Leave a comment
Log-in now or register for a free account.