problem with applet

Hello

I have a problem running an applet that visualises a document from Tamino.

<xapp:setvar name=“FILE”><xapp:directcommand type=“filesave” document=“textDocument”/></xapp:setvar>
<% SessionContext sessionContext = ServletSessionContext.getSessionContext(pageContext); %>
<% String jspVar = new String(sessionContext.getVariablesHandler().getVariable(“FILE”));%>


Unable to start plugin.




This is the error i get in the java console

load: class svgViz not found.
java.lang.ClassNotFoundException: svgViz
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:162)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:566)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1848)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:265)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:43)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:149)
… 9 more

the jar file is in WEB-INF/classes/
there is no difference if i set the codebase attribute pointing to the directory containing the jar.


btw. is there a way to to give as a parameter document?


Best krassy

hello krassy,

somewhere deep into your exception stack it says that theres an HTTP error.
does any of the data or possibly the SVG(?) code that you are trying to use come from a server other than the one from which the applet is being served?
if yes: that will not work, due to the applet sandbox, unless you sign your applet.

if this is not the problem, still the usual question applies: does it work when not in the context of an applet?

gruss,
andreas f.

Hi Andreas

Yes it runs when it is not in the context of an applet.

Can error possibly be that it cannot find the file saved by <xapp:directcommand type=“filesave” document=“textDocument”/> on the disk?

and if yes how can i solve this problem?

hello krassy,

as stated above: for applets there is the sandbox. it (basically) keeps the applet from opening network connections to any other server than the one from wich it comes. also, whithin the applet context you can not access the file system.
read up on applet security, sandbox and signing applets or you will run into problems constantly.

gruss,
andreas f.