setNonXml problem

I’ve got a problem with the setNonXML(java.lang.String url,java.lang.String inputFile) from the HTTP Client API for Java.
The most important part of the code is below (less important with …):

import java.applet.Applet;
import java.awt.;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import com.softwareag.tamino.api.dom.;
import com.docuverse.dom.
import org.w3c.dom.*;

public class CreaUfficio extends Applet
implements MouseListener {

TaminoNonXml taminononxml=new TaminoNonXml(“http://localhost/tamino/DatiIdrologici/Collection_Fiumi”);
String uurl=“http://localhost/tamino/DatiIdrologici/Collection_Fiumi/Immagine/po.gif”;


and the error at runtime:

Exception occurred during event dispatching: access denied ( h:\p
o.gif read)
at java.lang.SecurityManager.checkPermission(
at java.lang.SecurityManager.checkRead(
at com.softwareag.tamino.api.dom.TaminoNonXml.setNonXML(Unknown Source)
at com.softwareag.tamino.api.dom.TaminoNonXml.setNonXML(Unknown Source)
at CreaUfficio.action(
at java.awt.Component.handleEvent(
at java.awt.Component.postEvent(
at java.awt.Component.postEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEvent(
at java.awt.EventDispatchThread.pumpEvents(

Some observations:
The file “po.gif” has no particoular permission
The problem persists with all files (different names, different types)
The servlet version (exactly the same in the “taminononxml part”) compiles and runs ok!!!

I think could be a JAVA coding error done by me, 'cause the error come out from the line:
should I set someting for file interaction in applet version? I really don’t know how to solve.

thanks in advance.

Applets run in a java “sandbox” that isolates them from the local (client machine) file system to protect users from malicious applets. To overcome this you have to digitally sign your Applet, or find a way to access your data without using the client machine’s local file system.

Signing an Applet is a tricky business. You can get a feel for the issues at these links:

Making code trusted in Internet Explorer

Signing applets for the Sun Java Plug-In

Overcoming permission errors in a signed Java Applet

Servlets run server-side and can access the server’s local file system.


[This message was edited by Bill Leeney on 20 Nov 2002 at 10:08.]

Thanks for the answer.