I don't agree with you. The url is absolutely correct.
Read rfc 1738 http://www.w3.org/Addressing/rfc1738.txt

Fact is, that the loadImage() method of
org.apache.fop.image.GifImage does not work with
Weblogic when gif images reside within war files. The
problem is url.getContent() which throws a
NullPointerException. Custom resolvers for URLs don't
solve this problem as you mentioned. In my opinion the
loadImage() method needs to be changed. Otherwise
using gif images which are located in war files will
not work with Weblogic. 

I found the following workaround for loadImage(), i
just replaced 

ImageProducer ip =
(ImageProducer)this.m_href.getContent();

with 

Toolkit toolkit = Toolkit.getDefaultToolkit();
Image image = toolkit.getImage(m_href);
ImageProducer ip = image.getSource();

This works fine. The fop developers should consider to
change the implementation of loadImage().

regards,

Damir

--- "Andreas L. Delmelle" <[EMAIL PROTECTED]>
wrote:
> > -----Original Message-----
> > From: Damir Todorovac
> [mailto:[EMAIL PROTECTED]
> >
> > I'm using fop 0.20.4 in a servlet which runs on
> wls
> > 6.1. We create pdfs which consist of text and
> gifs.
> > The gif images are located in a jar file which is
> > under WEB-INF/lib of the war file. I'm retrieving
> the
> 
> <snip />
> 
> > The returned url is used in the 'src' attribute of
> the
> > 'fo:external-graphic' tag:
> >
> > <fo:external-graphic
> >
>
src="zip:C:/apps/Tip210/cs/websrv/bin/wls615/wlserver6.1/config/do
> >
>
chelper_2005/applications/.wlnotdelete/wlap61515/WEB-INF/_tmp_war_
> >
>
dochelper_2005_dochelper_2005_server_dochelpertest/WEB-INF/lib/image
> > s61077.jar!/images/logo.gif">
> > </fo:external-graphic>
> 
> First of all: the above URL is actually not a URL.
> At the least, it should
> be sth like
> 'zip://' etc.
> 
> Secondly, try to use
> <fo:external-graphic src="url(...)" /> (place the
> above url between the
> brackets)
> 
> And if that doesn't do the trick, I recall a post
> from a week or two ago
> about this very same type of problem. *The*
> suggested solution is to write a
> custom Resolver for this type of URL, although WRT
> details I can't help you
> any further (as I've not really an idea on how to do
> that), but I'm sure
> there's someone over here who can provide you with
> more info about that, so
> if the first tip doesn't work, be sure to re-post
> this issue. (-- or google
> around a bit for 'custom url resolvers'...)
> 
> Hope this helps!
> 
> Greetz,
> 
> Andreas
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to