Re: deployment of images
Check your maven configuration as George says.., because when you 're programming a component in a library (not in a webapp) there will be no src/main/webapp directory to put your images into, and you 'll need to do what you were doing before. cheers. Nicolás.- On Thu, Feb 21, 2013 at 1:44 AM, George Ludwig georgelud...@gmail.comwrote: Ken, But my app fails because somehoe the images for the tapestry component never made it. they dont exist inside my war file. This is a maven issue...you need to configure it to include the images. Your pom should have something like this in it: build resources resource directory src/main/resources /directory includes include **/*.png /include /includes /resource /resources ... On Wed, Feb 20, 2013 at 8:31 PM, Ken in Nashua kcola...@live.com wrote: Thanks Bob... that worked out terrific.
RE: deployment of images
Thanks George, I had located everything to context:images and I am reverting back to your solution. I prefer to locate images to their relevent peers thanks - cheers Ken
deployment of images
Folks, I designed a component. In the component directory I also put my button images for the component. I build using maven and it all gets packaged up in a war I copy my war to tomcat webapps dir But my app fails because somehoe the images for the tapestry component never made it. they dont exist inside my war file. kinda fooled since it all ran fine with jetty within eclipse development mode do I need to code this for my component images to get scooped up local to the component path ? or do I have to manually copy the images to an images dir to webapp dir ? Is there a canonical automatic way to efficiently handle component images without haveing to be hassled with configuring and copying ? I wish I could just run maven and everything be ok where it sits. Thanks for any tips kcola...@live.com
Re: deployment of images
On 2013/02/20 (Feb), at 8:32 PM, Ken in Nashua wrote: In the component directory I also put my button images for the component. Ordinarily, the images would go along with the context path rather than the class/java/tml files. For example, if I am building a component here: src/main/java/my/package/name/components/Widget.java ...then it will probably have these paths for strings and template: src/main/resources/my/package/name/components/Widget.properties src/main/resources/my/package/name/components/Widget.tml ...but *images* would go here: src/main/webapp/images/widget_bit1.png ...and then I reference it like: ${context:images/widget_bit1.png} There is probably a way to use images from the same path as the template/properties path, but I use the scheme outlined above. kinda fooled since it all ran fine with jetty within eclipse development mode In development mode, jetty is reading the classes straight from the compilation target directory, so I can kinda see how the classpath would allow for the image to be referenced one way and not the other, but I think it would take some customizing of the maven build file to get where you are at now. Is there a canonical automatic way to efficiently handle component images without haveing to be hassled with configuring and copying ? I think you would be interested in this reference: http://tapestry.apache.org/assets.html I wish I could just run maven and everything be ok where it sits. That's what I do, so I know it's possible. -- Robert Hailey
RE: deployment of images
Thanks Bob... that worked out terrific.
Re: deployment of images
Ken, But my app fails because somehoe the images for the tapestry component never made it. they dont exist inside my war file. This is a maven issue...you need to configure it to include the images. Your pom should have something like this in it: build resources resource directory src/main/resources /directory includes include **/*.png /include /includes /resource /resources ... On Wed, Feb 20, 2013 at 8:31 PM, Ken in Nashua kcola...@live.com wrote: Thanks Bob... that worked out terrific.