You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by JohnRodey <ti...@yahoo.com> on 2010/07/13 19:38:39 UTC

Can images be in the root level of the war?

Thus far my images have been stored inside the jar containing my pivot
application.  Now I want to add an html page that is packaged with my war
and attempts to use the same images as my pivot app.  Since accessing images
inside the jar from my html page seems to be difficult I was planning on
breaking the images out of my jar file and placing them in
tomcat/webapps/mywebapp/images/*.  However I'm not sure now how to reference
images in the wtkx file.

Secondly, can you store the wtkx files outside of the jar as well?
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Can-images-be-in-the-root-level-of-the-war-tp964228p964228.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Can images be in the root level of the war?

Posted by JohnRodey <ti...@yahoo.com>.
Thanks Greg,
Ill take your advice and simply duplicate them for the time being.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Can-images-be-in-the-root-level-of-the-war-tp964228p964617.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Can images be in the root level of the war?

Posted by Greg Brown <gk...@mac.com>.
Images and WTKX files can live outside the classpath - however, you'll need to write the code to load them yourself. WTKXSerializer doesn't support this directly.

If you only have a few images and/or they are fairly small, I'd suggest simply duplicating them in your source tree, or making a copy as part of your build process.

On Jul 13, 2010, at 1:38 PM, JohnRodey wrote:

> 
> Thus far my images have been stored inside the jar containing my pivot
> application.  Now I want to add an html page that is packaged with my war
> and attempts to use the same images as my pivot app.  Since accessing images
> inside the jar from my html page seems to be difficult I was planning on
> breaking the images out of my jar file and placing them in
> tomcat/webapps/mywebapp/images/*.  However I'm not sure now how to reference
> images in the wtkx file.
> 
> Secondly, can you store the wtkx files outside of the jar as well?
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Can-images-be-in-the-root-level-of-the-war-tp964228p964228.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.