Access Control Exception vs. Applet Viewer

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Access Control Exception vs. Applet Viewer

 
0
  #1
Dec 26th, 2005
I have a weird question. I'm trying to access a .txt file from a java applet, which would reside locally. When running this with the applet viewer, everything works fine. When you click on the .html file, however, you get an accesscontrolexception. I find it weird that the applet viewer works fine, but when you actually click on the .html file, it doesn't work right. Is there a reason for this?

PS: Do you REALLY need to sign an applet that uses a local file?
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Access Control Exception vs. Applet Viewer

 
0
  #2
Dec 27th, 2005
When you use the appletviewer you're not restricted by the security limitations imposed on applets.
When you run it in a browser you are so restricted.

One of those restrictions is the inability to access any data that doesn't reside in the same location as the applet itself (which includes locations on your own harddisk when running it from there which are outside the classpath of the applet).

Yes, you do need a signed applet with a valid security certificate that is authorised by your users.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Access Control Exception vs. Applet Viewer

 
0
  #3
Dec 27th, 2005
So the only thing the user will see is a 'certificate' that they can click ok or yes to, right? I thought I read something last night that involved passwords and stuff.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Access Control Exception vs. Applet Viewer

 
0
  #4
Dec 27th, 2005
yes, the user only has to accept the certificate.
For you it's more involved as you have to create it.
There's a tool included to make test certificates but for real use you're going to need an external party like Thawte which will cost money (I'd not trust a self-signed applet...).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Access Control Exception vs. Applet Viewer

 
0
  #5
Dec 27th, 2005
Thanks for all the help. I'm not too worried about users not trusting it, since no one will probably ever look.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC