Sun Java System Access Manager 7 2005Q4 Developer's Guide

ProcedureTo Run a Sample Program from the Access Manager Server

  1. Set the environment variables.

    The following environment variables are used to run the make command. You can also set these variables in the Makefile which is in the same directory as the sample files.


    Specify the directory where the Access Manager Server is installed.


    Specify the directory where all the .JAR files are installed. Example: AccessManager-base/SUNWam/lib


    Specify the JDK version your are using. The version must be JDK 1.3.1 or higher.


    Specify the directory where you will keep the sample compiled classes.


    Specify the directory where the .JAR of the sample classes will be created. The default is the current directory.

  2. In the directory AccessManager-base/SUNWam/samples/sso, run the gmake command.

  3. From the directory JAR_DIR, copy the file SSOSample.jar to the directory AccessManager-base/SUNWam/lib.

  4. Add AccessManager-base/SUNWam/lib/SSOSample.jar to web container classpath.

    Example: WebContainer-base/

  5. Register the Sample servlet.

    1. In the file WebContainer-base/https-host.domain/web-app/SERVICES_DEPLOY_URI/WEB-INF/web.xml, insert the following lines immediately after the last </servlet> tag:

    2. Insert the following lines immediately after the last </servlet-mapping> tag.

  6. Restart the Access Manager server.

  7. Log in to the Access Manager console.

    To execute SSOTokenSampleServlet, you must be authorized to access that resource. If you do not have authorization, the request will be denied. See the instructions for setting policy in the Administration Guide.

  8. Use a browser to access the following URL:

    protocol://host:port/ deploy-uri/SSOTokenSampleServlet

    The host name must be a fully qualified name. Your sample program should display the output in the browser.