Sun Java System Web Server 7.0 Update 4 Developer's Guide to Java Web Applications

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 it is not a standard Java EE mechanism.

To grant the required permission to the application, add the following code to the instance_dir/config/server.policy file:

grant codeBase "file:jar_file_path" {

The jar_file_path is the path to the application's JAR file.

Note –

If the Security Manager is disabled, it is not mandatory to grant permission.

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