Description
PackagedTextTemplate:155
When loading a resource, ResourceStreamLocator should give priority to the application specific locator first, and not using it as a fallback solution if the default ResourceStreamLocator fails to find the resource.
Imagine an environment where a custom resource locator has been set up to get all the resources from the project source folder (very useful during development to modify markups, css' and js' on the fly through the IDE).
With the current behavior I have to modify the deployed-version of my resource to make wicket apply the changes on the fly.
Here's my usual Application.init() method:
if( Application.DEVELOPMENT.equals( getConfigurationType() ) ){
getResourceSettings().setResourceStreamLocator(
new ResourceStreamLocator(
new Path(
new Folder(
getServletContext().getRealPath( "/" ).replaceFirst( "web/", "src/" )
)
)
)
)
}