I've written a Java Servlet to rasterize SVG files and I can run it
under Tomcat 4.  However problems arise when I try to rasterize files
which use the <use> tag to reference a resource in another file.  For
example, the sample files that come with Batik use this tag to insert
the logo from batikLogo.svg.  I believe this may be due to security
restrictions on classes running in the servlet context to restrict their
access to files, but I'm not sure about this.  In order to get the
InputStream I pass to the Transcoder I use
getServletContext().getResourceAsStream(filename) which enables me to
access a file within the servlet context.  Does anyone else have any
suggestions on what may be the cause of this problem or how to fix it?

The stack trace of the exception I'm getting is:

An I/O error occured while processing the URI
'batikLogo.svg#Batik_Squiggle' specified on the element <use>
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
        at 
edu.virginia.mag5v.SVGWebtools.SVGRasterizerServlet.doPost(SVGRasterizerServlet.java:104)

-Matt


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

Reply via email to