tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin.Geo...@undcp.org
Subject Applet from Browser
Date Fri, 22 Dec 2000 11:04:48 GMT
Dear all,

I am new in Java and sorry for asking this applet related question in this
forum.

I have created an applet to write something to a text file and it works
fine with appletviewer. I have created a policy file for it and it works
fine.
When  I try this applet within a browser(netscape 4.61) it gives an error
message like
-----------------------------------------------------------------------------------------------
java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)

     at java.security.AccessControlContext.checkPermission(Unknown Source)

     at java.security.AccessController.checkPermission(Unknown Source)

     at java.lang.SecurityManager.checkPermission(Unknown Source)

     at sun.applet.AppletSecurity.checkAccess(Unknown Source)

     at java.lang.ThreadGroup.checkAccess(Unknown Source)

     at java.lang.Thread.init(Unknown Source)

     at java.lang.Thread.<init>(Unknown Source)

     at javax.swing.TimerQueue.start(Unknown Source)

     at javax.swing.TimerQueue.<init>(Unknown Source)

     at javax.swing.TimerQueue.sharedInstance(Unknown Source)

     at javax.swing.JApplet.<init>(Unknown Source)

     at FileIOAppl.<init>(FileIOAppl.java:8)

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

my policy file contains
----------------------------------------------------------------------------------------------------------
/* AUTOMATICALLY GENERATED ON Tue Dec 19 10:57:16 GMT+01:00 2000*/
/* DO NOT EDIT */

grant {
  permission java.io.FilePermission "${user.home}/text.txt", "read, write,
delete, execute";
};
-------------------------------------------------------------------------------------------------------------

I am using JDK 1.3.
My basic question is where do  we keep policy file  for applet while
calling from browser?
What shuold be the name of this file?

Thanks in advance
martin




Mime
View raw message