velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Baughman <>
Subject Re: context and images
Date Mon, 05 Aug 2002 15:22:17 GMT
Your relative path should be relative to the file from which you are
calling the image.  For example, if the template is
...webapps/templates/welcome.vm, and the image is in
...webapps/images/logo.png, then the code would be:
<img src="../images/logo.png">

This has nothing to do with Velocity.  It's the way HTML works.

Barbara Baughman

On Mon, 5 Aug 2002, Tomasz Mielnik wrote:

> i know that this is a little offtopic but i'm going crazy with this.
> i have context in Tomcat "/webapp" and diferent servlets in this context
> (for example /webapp/servlet/showTemplate).
> in Velocity template i have a lot of pictures (pngs jpgs) but all with 
> relativ path
> <img src="images/logo.png">
> when i call servlet i can se no pictures ofcoz sine they have relative 
> paths.
> i dont want to add /webapp/images inforont of images form several 
> reasons. is there a solution for this?
> Tomasz Mielnik / Tdc Internet Polska
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message