2011/3/24 hok <ivanvasi...@gmail.com>
>
> 2. In the Servlet 3.0 specification it's possible to have static resources
> under META-INF/resources and I noticed that wicket has
> MetaInfStaticResourceReference, which is better for serving static
> resources. In my case for some components I have css files which are loaded
> like:
>
>        response.renderCSSReference(new PackageResourceReference(getClass(),
> getClass().getSimpleName() + ".css"));
>
> So, it should be better to move all those css files under
> META-INF/resources. However, this somehow contradicts with the wicket
> philosophy of having everything in one place and requires maintaining a
> parallel package folder structure under META-INF/resources. Do you think
> it's worth it?
>

Hi,

In my tests I found that Tomcat 7 serves static files from
META-INF/resources directory 2-3 times faster than wicket. So if performance
is important I think it is worth it. I am pragmatic about it: maybe it is
bad to not hold everything in the same directory but this is a feature that
fits wicket pretty well (bundling static files in jars) so it would be worse
to not use it.

Attila

Reply via email to