Sure, get the host and port from the servlet containter. Bill Ensley Bear Printing
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Meghana Dalvi Sent: Monday, September 26, 2005 8:58 AM To: Bruno Lowagie Cc: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] adding image in PDF File System.. hmm... Are you saying using path like like "C:/myProject/web/images/logo.gif" For local project: yes I can access the image that way but for actual implementation : might not be possible. as implementation of project on server is done by other team. I was wondering if there is any way to access the image with relative URL the way we do in HTML pages? At present I have hardcoded the image URL to "http://host:port#/images/logo.gif" Thanks in advance M.D. --- Bruno Lowagie <[EMAIL PROTECTED]> wrote: > Meghana Dalvi wrote: > > >I have J2EE web application which has a link to > print > >PDF document.When user clicks on this link , I > create > >a PDF file dynamically. > > > >Currently I am using URL to put the image in PDF. > >String url= "http://host:port#/images/logo.gif"; > >Image logo = Image.getInstance(url); > > > >The problem is URL might change sometimes from http://<host>:8080 to > >https://<host>:8443 > >So I would not want to rely on URL here. > > > >How do I place the image in the PDF without using > URL > >path in web application > > > Is the image reachable through the file system? > br, > Bruno > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions