You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by socke <so...@web.de> on 2005/12/15 20:52:30 UTC
how i can use
dear friends,
i have a big problem. i want to upload a applet that uses an SVGCanvas to show a svg File in the applet.
when i try to open the applet on the server there is always the same svg error dialog:
SVG Error:
Unable to make sense of URL for connection
java.io.IOException: Unable to make sense of URL for connection
at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown Source)
at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown Source)
at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
at org.apache.batik.swing.svg.SVGDocumentLoader.run(Unknown Source)
i use this as follows: both version dont work :( what do i have to do, to load and view the applet on the server ?
1)
URL url = new URL("http://www.host.de/~stse0003/junkbait/world.svg");
svgCanvas.loadSVGDocument(url.toString());
panel.add(svgCanvas, BorderLayout.CENTER);
getContentPane().add(panel);
2)
svgCanvas = new JSVGCanvas();
String svgUri = new File("world.svg").toURI().toString();
svgCanvas.setURI(svgUri);
pleas, does anybody have some ideas. i would be very very happy since i have spent a lot of time with and got crazy...
best regards, steve
Re: how i can use
Posted by th...@kodak.com.
Hi Steve,
sockensoldat@web.de wrote on 12/15/2005 02:52:30 PM:
> i have a big problem. i want to upload a applet that uses an SVGCanvas
to show
> a svg File in the applet.
> when i try to open the applet on the server there is always the same svg
error dialog:
>
> SVG Error:
> Unable to make sense of URL for connection
>
> i use this as follows: both version dont work :( what do i have to do,
to load
> and view the applet on the server ?
> URL url = new URL("http://www.host.de/~stse0003/junkbait/world.svg");
> svgCanvas.loadSVGDocument(url.toString());
My guess is that you are running into restrictions on what an Applet
can
load. So unless 'http://www.host.de/' is the host and protocol that the
Applet was loaded from you couldn't load that file. Also it's best to
call 'loadSVGDocument' after you add the Canvas to the UI.
> svgCanvas = new JSVGCanvas();
> String svgUri = new File("world.svg").toURI().toString();
> svgCanvas.setURI(svgUri);
This will 100% not work. First off this would try and read a file
from
the local host (probably not what is intended) and secon off Applets
aren't
allowed to read from the local host.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org