Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: Precautions
- Next: The ProgrammaticLogin Class

## Granting Programmatic Login Permission

The `ProgrammaticLoginPermission` permission is required to invoke the programmatic login mechanism for an application. This permission is not granted by default to deployed applications because this is not a standard J2EE mechanism.

To grant the required permission to the application, add the following to the domain-dir`/config/``server.policy` file:

    grant codeBase "file:jar-file-path" {
         permission com.sun.appserv.security.ProgrammaticLoginPermission
         "login";
     };

The jar-file-path is the path to the application’s JAR file.

For more information about the `server.policy` file, see The server.policy File

- Previous: Precautions
- Next: The ProgrammaticLogin Class

- © 2010, Oracle Corporation and/or its affiliates