You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2012/04/19 08:16:30 UTC

Static images and ResourceMapper in Wicket 1.5

I'm wondering what is the preferred way to include static image resources to
my web application. Instead of having a directory like "images" in my root
web container (WEB-INF) with all the static images used in my application it
is advised (so far I can remember) to have a directory next to the
Application class and mount these image resources with the ResourceMapper.

At the moment I refer to images in my root web container from a Panel's
markup file like



This works for me but I wanna go the "wicketzed" way. If I would use the
ResourceMapper in my Application class I would mount just one image resource
the following way:


What is the preferred way to mount all resources at ones in one directory? 
How can these changes be applied to the corresponding markup files of my
Panels without creating an Image (or ContextImage?) component?
Thanks for your hints.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Static-images-and-ResourceMapper-in-Wicket-1-5-tp4570016p4570016.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Static images and ResourceMapper in Wicket 1.5

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Read http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

But don't do it just because this way it is more "Wicketized". It is
much better if static resources are served by the web container,
frontend proxy and even better if they are served by CDN.

On Thu, Apr 19, 2012 at 9:16 AM, Dirk Forchel <di...@exedio.com> wrote:
> I'm wondering what is the preferred way to include static image resources to
> my web application. Instead of having a directory like "images" in my root
> web container (WEB-INF) with all the static images used in my application it
> is advised (so far I can remember) to have a directory next to the
> Application class and mount these image resources with the ResourceMapper.
>
> At the moment I refer to images in my root web container from a Panel's
> markup file like
>
>
>
> This works for me but I wanna go the "wicketzed" way. If I would use the
> ResourceMapper in my Application class I would mount just one image resource
> the following way:
>
>
> What is the preferred way to mount all resources at ones in one directory?
> How can these changes be applied to the corresponding markup files of my
> Panels without creating an Image (or ContextImage?) component?
> Thanks for your hints.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Static-images-and-ResourceMapper-in-Wicket-1-5-tp4570016p4570016.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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