Progress
Open Client
Developer’s Guide


Asking For Permission In Netscape Version 4

Asking for permission in Navigator requires compiling your applet to use permissions. To do this, you must:

  1. Download Netscape’s Object Signing Tools and the Capabilities API Classes from the Netscape Web Site.
  2. Put the Capabilities API classes in your CLASSPATH and add the following import statement in your applet
  3. import netscape.security.PrivilegeManager; 
    

  4. Insert the following code into your applet just before creating your Java proxy AppObject:
  5. try 
    { 
            if (Class.forName("netscape.security.PrivilegeManager") != null) 
            { 
                try 
                { 
                   PrivilegeManager.enablePrivilege("UniversalConnect");
                } 
                catch(Exception ex) 
                { 
                   System.out.println("Netscape threw exception: " +
                   ex.toString());  
                } 
            } 
    } 
    catch(ClassNotFoundException e) 
    { 
             System.out.println("Netscape Security Manager not found"); 
    

    When you use the Netscape security model, the user is prompted for the specific permission each time you call the enablePrivilege method. If a user gives your applets the requested permission, the Java proxy is instantiated. For more information on the Netscape permission based security model, see the Netscape Web site.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095