Zeldor <pgronkiewicz <at> gmail.com> writes:

> 
> 
> Hi,
> 
> I am trying to group all my images into one folder, but the problem is that
> I cannot get them displayed - that is as long as that folder path is higher
> in the hierarchy than my html files. 
> 
> So  images/image.jpg  works perfectly, but
> /src/main/resources/images/resources/image.jpg  does not, even though at
> preview it shows the image correctly.
> 
> I was trying to add src in the class or even use ResourceReference, but no
> luck. I am using Google Appengine, if it matters.
> 
> So, how to solve that? I'd really hat to put duplicates into every
> subfolder.
> 
> P.S. When we are at images - how can I secure my hierarchy when someone
> checks image details? Now it shows whole path to it, so like
> /src/main/resources/images/resources/image.jpg, but I'd want it to show only
> /image.jpg or nothing :)


Hi Zeldor,

you should take a look at class ContextImage in package
org.apache.wicket.markup.html.image. With this class you can easily load images
giving a path relative to the context root. 
But if you want to hide images hierarchy I think you should delegate image
fetching to a page or a servlet and call it in src attribute.

example: <img src="showimage?img=tst.jpg">   where  showimage is mapped to a
page or a servlet which retrieve the physic image path. However I' don't have
tried it.

bye bye!    


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

Reply via email to