Re: How to include an external graphic using a relative path
You can define baseDir property (see faq howto) as getServletContext().getRealPath(/project/img) snip... Just a reminder that getRealPath( ... ) is allowed to return null if the application is deployed for example in a war file, according to the servlet spec. This advice is hence likely to work, but it is not portable. __ This message and its attachments have been found clean from known viruses with three different antivirus programs. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to include an external graphic using a relative path
Using FOP, I succesfully wrote a servlet to generate PDF's from in-memory DOM object's containing XSL-FO markup. I able to embed graphics files by specifying a physical path as in: fo:external-graphic src=url(/project/img/image.gif)/ However, since this is a web application, I need to be able to specify a relative path for the image file. Thanks for you help, /** Gustavo C. Lopez Tetra Tech, Inc. 10306 Eaton Place, Suite 340 Fairfax, VA 22030 @Voice: (703) 385-6000 x335 @Fax: (703) 385-6007 @Email: [EMAIL PROTECTED] @Url: http://www.ttwater.com */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to include an external graphic using a relative path
Gustavo Lopez wrote: Using FOP, I succesfully wrote a servlet to generate PDF's from in-memory DOM object's containing XSL-FO markup. I able to embed graphics files by specifying a physical path as in: fo:external-graphic src=url(/project/img/image.gif)/ However, since this is a web application, I need to be able to specify a relative path for the image file. You can define baseDir property (see faq howto) as getServletContext().getRealPath(/project/img) and then use relative pathes in fo:external-graphic. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]