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

ProcedureTo Run the Sample Code

  1. In the /opt/SUNWam/samples/sso directory, run the gmake command.

    This compiles the samples and creates the necessary JAR files.

  2. Register the sample servlet.

    1. In the file WebServer-base/https-hostName.domainName. com/is-web-apps/services/WEB-INF/web.xml,insert the following lines immediately after the last </servlet> tag.

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

               
             
      <servlet-mapping>
             <servlet-name>SSOTokenSampleServlet</servlet-name>
             <url-pattern>/SSOTokenSampleServlet</url-pattern>
             </servlet-mapping>       
      
  3. Restart the web container where the Access Manager Client APIs are installed.

  4. Log in to the Access Manager server.

  5. To Invoke the servlet, use a browser to go to the following URL:

    http://amsdk-server.sub.domain/servlet/SSOTokenSampleServlet

    The SSOTokenSampleServlet servlet validates the session and prints out all relevant session information. You may have to reload the URL (Shift + Reload Button) to see updated information.

  6. Log out of the Access Manager server.

    Because no log out link exists in the sample servlet, you must use a browser to access the Access Manager server log out URL. Example: https://hostName.domainName.com/amserver/UI/Logout

  7. To verify that the client SSOtoken is no longer valid, invoke the servlet a second time.

    Use a browser to go to the following URL:

    http://amsdk-server.sub.domain/servlet/SSOTokenSampleServlet

    This time, a session exception occurs. Reload the URL to see the updated information.