Orford, Jeffrey wrote:

Hi-
I'm attempting to use a gif image using the fo:external-graphic tag.  Both
the gif file and the xsl file are located in a war file.  The gif is located
in a directory /images (from the war file's root) and the xsl file is
located in a directory named web-inf.  So far I've tried using the
following:

What is the best way to refer to an image from within a war file?  Is the
war file even the issue?


Try
ServletContext.getResource("/images/logo.gif");
This will return mysterious java.net.URL instance.
Put this URL (toString) into fo file (you have to
process this file before running FOP - maybe Velocity?).

Tomek Pik
[EMAIL PROTECTED]



Thanks. Jeff Orford




Reply via email to