I'm trying to make static resources have a distinguishable part of their
URL near the beginning of the URL to enable easy configuration of third
party filters that need to ignore requests for static resources and just
proceed along the filter chain.
 
I've looked up the operation of
org.apache.wicket.request.resource.caching.IResourceCachingStrategy#deco
rateUrl but it appears that it only has the ability to make changes near
the end of the resource URL after all the major segments of the URL have
already been set ie., after this part
 
/wicket/resource/org.apache.wicket.... rest of pathname.ClassName
 
What I am trying to do is get all static resources to end up with a
distinguishable URL that starts off something like:
 
/wicket/resource/static/pathname.ClassName
 
so I can configure a filter to ignore /wicket/resource/static/*
 
In BasicResourceReferenceHandler.mapHandler() perhaps after adding the
resource identifier segment:
 
segments.add(getContext().getResourceIdentifier());
 
it could append an extra segment for static resources:
 
final IResource resource = reference.getResource();
 
// if static resource
if (resource instanceof IStaticCacheableResource)
{
segments.add("static");
}
 
And so end up with /wicket/resource/static/org.apache.wicket ...
 
 
 
I also observed that Wicketstuff resources don't use the /wicket
namespace prefix. They just start out at 
 
/resources/org.name.project.MyClass.script.js
 
So they'd need a separate ignore entry in the filter.
 
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software

 
pagebloom - your business & your website growing together
 
Sydney: (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120     
Email: chr...@stepahead.com.au <mailto://chr...@stepahead.com.au> 
Website:
http://www.pagebloom.com <blocked::http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/> 
 
 

Reply via email to