Thomas DeWeese wrote:
> Richard Mixon (qwest) wrote:
>
>> I checked my SVG markup and am not sure how I would change this as
>> I'm using an xlink:href. Here is an example:
>>
>>        xlink:href="images/allTimeBest/<c:out
>> value="${cmSummary.allTimeBestIcon}"/>"
>
>     This means that it is using the base URL for the document
> to resolve the image reference.  The base URL for the
> document would be provided when you parse the document.

I have set the base directory as follows:

  String httpBaseDir = ".";
  imageURLProtocol = getInitParameter("imageURLProtocol");
  String baseDir = this.getServletContext().getRealPath(httpBaseDir);
  userAgent = new FOUserAgent();
  userAgent.setBaseURL(imageURLProtocol+baseDir);
  log.info("init - setting httpBaseDir='"+httpBaseDir+"',
baseDir='"+baseDir+"'");

Here is the output from the last "log" statement:

  09:20:23,646  INFO [main] SVG2PDFServlet:112 - init - setting
httpBaseDir='.', baseDir='c:\jakarta-tomcat-5.5.7\webapps\stars\.'

I think I am setting this base directory correctly. Maybe not?

I did some more tests before also posting this on the Tomcat list. The
results were interesting:
  Works fine with:
    Tomcat 5.0.x and Java 1.4.1_02
    Tomcat 5.5.7 and Java 1.4.1_02
  Throws the exception (below) with:
    Tomcat 5.5.7 and Java 1.4.2_03
    Tomcat 5.5.7 and Java 1.5.0_01

So I can get it to work with Tomcat 5.5.x with an earlier version of
Java 1.4.

Thank you - Richard


Repeating part of the exception for those that might not have seen the
earlier part of the thread:

09:20:56,146 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could
not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1
An I/O error occured while processing the URI
'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa
ce.gif' specified on the element <image>
org.apache.batik.bridge.BridgeException:
file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1
An I/O error occured while processing the URI
'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa
ce.gif' specified on the element <image>
        at org.apache.batik.bridge.SVGImageElementBridge.openStream(Unknown
Source)
        at
org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Un
known Source)
      <SNIP>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to