Description
Servlet 3.0 introduced a new feature: files placed under the "META-INF/resources" folder inside of a jar in the "/WEB-INF/lib" folder are served by the container in the same way as other static files. I made a speed test and it showed that Tomcat 7.0.5 serves files from this location 2-3 times faster than wicket with its own method.
So it could be beneficial for wicket if it supported this when running on a Servlet 3.0 engine. I think this should be made in wicket itself (and not as an external module) because so wicket could use it too and implementing it could need some specific hooks.
An implementation could roughly include the followings:
- a new ResourceReference subtype so users can choose to use this type of resource handling for their bundled static files
- logic that generates different urls for the new ResourceReference subtype based on if it is running on Servlet 3.0 engine (no need for "wicket/resource/" prefix, example url: "org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js") or it is running on older engines (url would be the same as now: "wicket/resource/org.apache.wicket.extensions.yui.YuiLib/yuiloader/yuiloader-min.js")
- logic that finds the resource even if it is on the "META-INF/resources/" prefixed classpath.