problem with applet


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(
at java.lang.ClassLoader.loadClass(
at sun.applet.AppletClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at sun.applet.AppletClassLoader.loadCode(
at sun.applet.AppletPanel.createApplet(
at sun.plugin.AppletViewer.createApplet(
at sun.applet.AppletPanel.runLoader(
Caused by: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(
at sun.applet.AppletClassLoader.access$100(
at sun.applet.AppletClassLoader$
at Method)
at sun.applet.AppletClassLoader.findClass(
… 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?

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.

andreas f.