If these are just static images in a directory in your webapp then you don't need the functionality of an Asset for that. How about just doing it the old fashioned way?
<img src="/images/some_image.jpg"/> Most of my images are done like this... sometimes I need an absolute url and I prepend that. Josh On Dec 4, 2007 4:45 PM, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > Hello all, > > I am trying to create a getter that returns the relative path to the > images > directory for my application. I want it to apply in template HTML files > as: > > <img src="${imagesBase}/some_image.jpg"/> > > I found a previous thread ( > > http://www.nabble.com/T5-How-to-difine-dynamic-path-for-image-t4834269.html > ) on how to do this using AssetSource but this did not work for me as it > requires the java class to know the exact resource location. This isn't > beneficial when work is passed on to web designers who do not have any > programming experience, nor should have to. > > I have also tried the following java code but I keep getting runtime > errors > > @Inject > @Path("context:images") > private Asset imagesBase; > > public Asset getImagesBase() { return imagesBase; } > > Any help on this would be great. Thanks. > > Jean-Philippe Steinmetz > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.