Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / October 2003

Tip: Looking for answers? Try searching our database.

Granting permissions in java.policy file

Thread view: 
Terri I. - 15 Oct 2003 17:05 GMT
I have an applet that copies images to the system clipboard.  Everything works
fine if I grant permission to access the clipboard as a global privilege.  But
when I try to specify the URL codeBase, I continue to get access denied error
that the accessClipboard permission is needed.

Here is what I included in the java.policy file:
grant codeBase "http://abc-ain-www01.org/TestNewBrowsers/*" {
    permission java.awt.AWTPermission "accessClipboard";
};

I know the java.policy file is in the right location because it works when I
put in the global grant.

I have read that including the /* means that the .jar file and
the .html page that calls the .jar file would be 'covered' by the policy file.
Not sure how this works behind the scenes, so here is my question:  what if the
calling page is a ColdFusion program with the .cfm extension as opposed to a
pure .html page?  Does that cause problems??
Terri I. - 17 Oct 2003 18:43 GMT
An update:
I just created a quickie html page that launches my applet, and I get
same error so it obviously doesn't have anything to do with ColdFusion.
I have seen previous postings where folks had similar problems.
Has anybody resolved their problems with getting the java.policy file
to work when defining URL codebase??

> I have an applet that copies images to the system clipboard.  Everything works
> fine if I grant permission to access the clipboard as a global privilege.  But
[quoted text clipped - 14 lines]
> calling page is a ColdFusion program with the .cfm extension as opposed to a
> pure .html page?  Does that cause problems??


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.