I am developing a web-application with Tapestry and I have a bunch of images that application displays in more than one page, so I wrote the path in WEB-INF/app.properties file.
But I need to concat the context to write the correct path in .tml. When I don’t have the path wrote in a .properties, I just write the following code:
<img src="${context:relativePath}/>
If I have the path in ${messages:imgPath} I am not able to do this:
<img src="${context:${message:deleteIconPath}"}
I was reading for a while and I think that maybe the solution is in the controller class, but I am not sure.
Thanks to all.
So, I’ve been thinking and found a solution: set urls in contex-params on “web.xml”.
Then, I define an Asset on controller class:
In “.tml” put the src as “${image}”.