Images Path
- From: "Eugene Lantsman" <e_lantsman (at) hotmail.com>
- Date: Tue, 31 Jan 2006 10:56:14 -0500
Hi Richard
In your servlet you can find out the path of the root of your web
application, then use that path to access images folder inside the root...
Try this in your servlet:
String URL_ROOT = getServletContext().getRealPath(".");
String URL_IMAGES = URL_ROOT + "/images";
Good luck
Eugene
----- Original Message -----
From: "Richard Johnstone" <Richard.Johnstone (at) appleyard-contracts.co.uk>
To: <itext-questions (at) lists.sourceforge.net>
Sent: Tuesday, January 31, 2006 5:19 AM
Subject: [iText-questions] Images Path
Hi
I have just started with iText.
I can create a pdf via a servelt fine.
When I try and add an image in as a path I get an error saying image can't
be found.
It is looking at c:\x\x\x etc etc.
If I build the URL up of the image I get a proxy error.
Can iText not just get the image using a relative path ie same way as I do
it in html (../images/myimage.jpg)
Or if not, what is iText using to detwermine the document root for the
images
Many Thanks
RIch
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
- References:
- Images Path
- From: "Richard Johnstone" <Richard.Johnstone (at) appleyard-contracts.co.uk>