W3C home > Mailing lists > Public > www-xsl-fo@w3.org > February 2010

Re: Re: Image not available

From: Paulo Carvalho <pjcarvalho@gmail.com>
Date: Wed, 17 Feb 2010 09:29:50 +0100
Message-ID: <8f151cff1002170029k1fc2bed5vadd5a061a5aa19fb@mail.gmail.com>
To: www-xsl-fo@w3.org
Cc: Dave Pawson <dave.pawson@gmail.com>

Thanks for your answer.
No, the image is in the correct path and the name is also correct. The image
is on a Jar file named App.jar and has the name logo.gif. It is on the "img"
path into the jar file.

When I set the systemId on the StreamSource, the value is:



String sss = this.getClass().getClassLoader().getResource("img/cnpf.gif").toExternalForm();

int idxl = sss.lastIndexOf("/");
String subs1 = sss.substring(0, idxl);
int idxl2 = subs1.lastIndexOf("/");
String subs2 = subs1.substring(0, idxl2+1);
System.out.println("subs2: " + subs2);


Transformer foTrans = tFactoryXML2FO.newTransformer(streamSource);



Note1: The problem only occurs when I build a war on my web service and i
deploy it using the command line, on my tomcat server.
If i use eclipse to deploy my web service, the problem does not occur. The
image is found into the jar file.

Note2: when my web service is deployed without using eclipse, the problem
occurs. But if i put the img folder on the tomcat root directory, the image
is found.

Thank you


On Wed, Feb 17, 2010 at 9:22 AM, Dave Pawson <dave.pawson@gmail.com> wrote:

> On 17 February 2010 08:11, Paulo Carvalho <pjcarvalho@gmail.com> wrote:
> > Hello again
> > Just for info, I was using fop093 and I switched to fop095, but without
> any
> > improvements.
> > The application still cant find the image...
> Or the image isn't in the relative location that you specify?
> Have you tried an absolute reference?
> regarsd
> --
> Dave Pawson
> Docbook FAQ.
> http://www.dpawson.co.uk

Paulo Carvalho
1 rue du Chateau
57710 Aumetz
Received on Wednesday, 17 February 2010 08:30:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:12 UTC