944,117 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 4786
  • Java RSS
Dec 26th, 2005
0

Access Control Exception vs. Applet Viewer

Expand Post »
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?
Similar Threads
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Dec 27th, 2005
0

Re: Access Control Exception vs. Applet Viewer

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 27th, 2005
0

Re: Access Control Exception vs. Applet Viewer

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.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Dec 27th, 2005
0

Re: Access Control Exception vs. Applet Viewer

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...).
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 27th, 2005
0

Re: Access Control Exception vs. Applet Viewer

Thanks for all the help. I'm not too worried about users not trusting it, since no one will probably ever look.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java communications.
Next Thread in Java Forum Timeline: I need help as soon possible





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC