security exception fired by javascript and ok inside the applet

hello,

I wrote a signed applet with a method to read files from the user's hard drive

the web page contains 2 buttons :

1) one included in the html part : form -> input type button -> javascript function -> java method

2) one includes in the java applet : JButton -> ActionListener -> class actionAdapter -> actionPerformed -> same java method (as in 1)

if I click on the html button, I've got a security exception

if I click on the java button, I can read local files from the hard disk

do you have an explanation ?

my configurations are :

- 1.5.0. java, windows 2000, IE 6 or (1.0.6 or 1.5 ) firefox

- 1.4.2 java, fedora c4, 1.0.7 firefox

[730 byte] By [screen_jcj_forumsa] at [2007-10-2 19:51:44]
# 1
Hi.At me a similar problem. If to use jre1.4.1 - that both buttons work.
Seena at 2007-7-13 22:30:48 > top of Java-index,Security,Signed Applets...
# 2

You have to use doprivileged becuase trusted (signed applet) code is

called from untrusted (javascript) code. The whole stack needs to be trusted

in order for it to work.

Signing applets:

http://forum.java.sun.com/thread.jsp?forum=63&thread=524815

second post and reply 18 for the java class file using doprivileged

http://forum.java.sun.com/thread.jsp?forum=63&thread=409341

4th post explaining how to set up your own policy with your own keystore

Still problems?

A Full trace might help us out:

http://forum.java.sun.com/thread.jspa?threadID=656028

harmmeijera at 2007-7-13 22:30:48 > top of Java-index,Security,Signed Applets...
# 3
Works, though and not so as desirable.Thank you.
Seena at 2007-7-13 22:30:48 > top of Java-index,Security,Signed Applets...