Hi,

I have a J2EE application I've been working with for about 2 years now and I just started to snoop around iText and so far it is quite good.  In the code that I have developed so far, there is only one thing that I can't seem to make work.  The images.

How does someone import an image from the current J2EE project that you are in?   What I don't want is referring to an image from a URL (because the URL might change from on environment to another and we want the code to be pretty much static).   I also cannot have a reference to a file on a drive (i.e. c: drive), this might cause problems because our EAR file is setup on a server and access to the server is restricted.  All our images are part of the EAR file that we have

I can't have this:
Image jpg = Image.getInstance("C://file/image/otsoe.jpg");

or this
Image jpg = Image.getInstance("http://www.website.com/image/otsoe.jpg");


Is there some other way to import (or create an instance of the image).... sort of a getInstance("/image/otsoe.jpg"); with a relative path to the EAR file.  (we must be carefull here, I don't want a relative path to the current location of the server ... because server configuration might change to from one machine to another.

Has anyone encountered this before?

Let me know ... thanks

Remi Paquette

Reply via email to