Ok I ask you where are the batik-archives ?
The client don not have these archives !
Please extend you applet-tag with codebase attribute.

refer: http://java.sun.com/docs/books/tutorial/applet/

Jan

-----Ursprüngliche Nachricht-----
Von: Claire WALL [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 24. Februar 2003 14:11
An: Batik Users
Betreff: Re: AW: importing an SVG graphic into an applet


my HTML code is something like:

<HTML>
<BODY>

<APPLET code="TestSVGInApplet.class" WIDTH="100" 
HEIGHT="100"></APPLET>

</BODY>
</HTML>

I have my HTML file and applet code in the same directory (folder). 
I wasn't certain where the applets were supposed to go in the 
structure of a web module. When I had them in the classes folder 
along with my servlets the HTML file couldn't find the applet code 
(I'm assuming that I got my path in the applet code wrong).

how do I extend my applet classpath? i havent read about this 
anywhere. what do i have to extend it to? any examples would be 
great

thanks :)

On 24 Feb 2003, at 14:04, Lolling, Jan wrote:

> Please send your HTML-code ...
> It is necessary to extend you applet-classpath with batik archives.
> See applet tag attributes: codebase and archives....
> 
> Jan
> 
> -----Ursprüngliche Nachricht-----
> Von: Claire WALL [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 24. Februar 2003 13:47
> An: batik Users
> Betreff: importing an SVG graphic into an applet
> 
> 
> Hi,
> 
> I have successfully managed to import an SVG graphic/file into an 
> application but when trying to import an SVG graphic into an applet 
> I am having some problems.
> 
> Here's the code for my applet:
> 
> import org.apache.batik.swing.*;
> import org.apache.batik.swing.JSVGCanvas;
> import org.apache.batik.svggen.*;
> import 
> org.apache.batik.dom.svg.SVGDOMImplementation;
> import org.w3c.dom.*;
> import org.w3c.dom.svg.*;
> import javax.swing.*;
> import java.awt.*;
> import java.awt.geom.*;
> 
> public class TestSVGInApplet extends JApplet
> {
>     
>     public void init()
>     {
>         DOMImplementation impl = 
> SVGDOMImplementation.getDOMImplementation();
>         String svgNS = 
> SVGDOMImplementation.SVG_NAMESPACE_URI;
>         SVGDocument doc = 
> (SVGDocument)impl.createDocument(svgNS, "svg", 
> null);
>         
>         
>         Container c = getContentPane();
>         
>         //Now, display the document
>         JSVGCanvas canvas = new JSVGCanvas();
>         
> canvas.setURI("http://localhost:8081/SVGImages/In
> tro.svg");
> 
>         c.add(canvas);
>     }
> 
> }
> 
> 
> When I run the corresponding HTML page (with the applet 
> embedded using the <APPLET> tags) I get this error:
> 
> java.lang.NoClassDefFoundError: 
> org/apache/batik/swing/JSVGCanvas     
>     at java.lang.Class.newInstance0(Native Method)    
>     at java.lang.Class.newInstance(Unknown Source)    
>     at sun.applet.AppletPanel.createApplet(Unknown 
>     Source)   
>     at sun.plugin.AppletViewer.createApplet(Unknown 
>     Source)   
>     at sun.applet.AppletPanel.runLoader(Unknown Source)       
>     at sun.applet.AppletPanel.run(Unknown Source)     
>     at java.lang.Thread.run(Unknown Source)
> 
> 
> I had no problems getting the SVG graphic to view in the 
> application (server was running but the application was run from the 
> command line). However, when I run the above code on Tomcat it 
> causes the above error. Any ideas? How do you get the SVG file to 
> work in an applet running on Tomcat? Any help would be great.
> 
> 
> 
> ---------------------------------------------------------------------
> 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]
> 



---------------------------------------------------------------------
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]

Reply via email to