image not included in my pdf under web-project
Hi, I am unsing XML and XSLT for creating my fo file in my web project. But I am unable to include my image. Please let me know how I need to write mey path. Right now I have code like this from my xsl file fo:external-graphic src=url(../../../web/image/A.jpg) height=40pt width=60pt/ my xsl file is web-inf/classes/xsl/A.xsl and image directory is /Context/web/image Please help me Thanks in advance Vivek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: image not included in my pdf under web-project
I had the same issue and found that my application was WARed up and the image file would not get included. For a diff reason we abandoned the idea of having a gif file in first place.. vivek gupta [EMAIL PROTECTED]To: [EMAIL PROTECTED] o.com cc: Subject: image not included in my pdf under web-project 08/18/2004 10:29 AM Please respond to fop-user Hi, I am unsing XML and XSLT for creating my fo file in my web project. But I am unable to include my image. Please let me know how I need to write mey path. Right now I have code like this from my xsl file fo:external-graphic src=url(../../../web/image/A.jpg) height=40pt width=60pt/ my xsl file is web-inf/classes/xsl/A.xsl and image directory is /Context/web/image Please help me Thanks in advance Vivek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: image not included in my pdf under web-project
vivek gupta wrote: I am unsing XML and XSLT for creating my fo file in my web project. But I am unable to include my image. Please let me know how I need to write mey path. src=url(../../../web/image/A.jpg) A relative URL is usually resolved against the CWD of the servlet container process, and not interpreted as relative to the webapp root. Either use an absolute file path, a proper relative path (which depends on your servlet container and probably also on how it is started), or use a full http URL and retrieve the image through another servlet (protect the URL against non-local access if necessary). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: image not included in my pdf under web-project
Or you can set the base directory for FOP to be the root of your Servlet Context by calling: Configuration.put(baseDir,getServletContext().getRealPath(/)); I use this code in the Servlet.init() of my controller since it only needs to be called once. (*Chris*) Original Message --- vivek gupta wrote: I am unsing XML and XSLT for creating my fo file in my web project. But I am unable to include my image. Please let me know how I need to write mey path. src=url(../../../web/image/A.jpg) A relative URL is usually resolved against the CWD of the servlet container process, and not interpreted as relative to the webapp root. Either use an absolute file path, a proper relative path (which depends on your servlet container and probably also on how it is started), or use a full http URL and retrieve the image through another servlet (protect the URL against non-local access if necessary). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]