For development you can keep the resources in the usual, wicket
preferred location (next to the class files), and when you package
your jars you can instruct your build tool to move them to
META-INF/resources

Best of both worlds :)

Martijn

On Thu, Mar 24, 2011 at 7:17 AM, Attila Király
<kiralyattila...@gmail.com> wrote:
> 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
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to