The servlet is running within Weblogic 5.1 (my firm's standard for the time
being)  I'll try this one, Thanks again.
Jeff

-----Original Message-----
From: Tomasz Pik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 9:43 AM
To: [EMAIL PROTECTED]
Subject: Re: external-graphic within a war file


Can you write, which servlet engine you use?
I think, that url should have the following stucture:

jar:file:c|//TEMP/mercury/lib/war/ecm/webapp_info.war!images/logo_gs.gif

Tomek

Orford, Jeffrey wrote:

> Thanks for the suggestion Tomasz, unfortunately it didn't work.  The URL
> printed out as the following(without quotes):
> "zip:C:/<path to warfile>/webapp_dealinfo.war#images/logo_gs.gif"
> 
> when I put this string in the fo xsl file as the value of the src
attribute
> I got a similar error:
> "[1Error while creating area : Invalid Image URL - error on relative URL :
> unknown protocol: nullc]"
> 
> 
> Any other suggestions would be appreciated.  Here's what the code looks
like
> now:
> <fo:table-cell>
>   <fo:block>
>     <fo:external-graphic
> src="zip:C:/TEMP/mercury/lib/war/ecm/webapp_info.war#images/logo_gs.gif"
/>
>   </fo:block>
> </fo:table-cell>
> 
> Thanks.
> Jeff Orford
> 
> -----Original Message-----
> From: Tomasz Pik [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 09, 2002 2:15 AM
> To: [EMAIL PROTECTED]
> Subject: Re: external-graphic within a war file
> 
> 
> 
> 
> 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