Hi hardc0d3r,

I guess the problem is the the pathOfFile should be:

"file://" + path

and NOT

"file:\\" + path


Give it a try, I think this sould solve the problem.

Regards,

Fabi


> 
> i am having some trouble loading an svg file from a linux server.. here is a
> snippet of my servlet:
> 
>     private SVGDocument loadSVGMap(String path) {
>         String pathOfFile = "file:\\" + path;
>         System.out.println(pathOfFile);
>         try {
>             String parser = XMLResourceDescriptor.getXMLParserClassName();
>             SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
>             return f.createSVGDocument(pathOfFile);
>         } catch (IOException ex) {
>             p = pathOfFile;
>             error = ex.toString();
>             return null;
>         }
>     }
> 
> In my own computer (windows xp) i can load the svg file but when i try it on
> a linux server (eatj.com), i cannot load the file.. i use the
> getServletContext().getRealPath() and i tested it and it does return the
> path.. any ideas on how to load a file in a linux server?
> -- 
> View this message in context: 
http://www.nabble.com/Loading-svg-from-a-linux-server-tp17735305p17735305.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
Fabian Unfried
Software Engineer

proveo GmbH | A Zebra Technologies Company
Rossfelder Str. 65/5 | 74564 Crailsheim | Germany
Phone: +49 7951 963610 | Fax: +49 7951 963650
mailto:[EMAIL PROTECTED] | http://www.proveo.de

Managing Directors: 
Steffen Knödler | Harald Knödler | Holger Gerwin 

Registered Office: Ulm, HRB 721672 

Disclaimer: This message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law. If
the reader of this message is not the intended recipient, or the employee or
agent responsible for delivering the message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please delete it and notify the sender immediately.
Thank you.

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

Reply via email to