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.
In the directory AccessManager-base/SUNWam/samples/sso, run the gmake command.
From the directory JAR_DIR, copy the file SSOSample.jar to the directory AccessManager-base/SUNWam/lib.
Add AccessManager-base/SUNWam/lib/SSOSample.jar to web container classpath.
Example: WebContainer-base/https-machine.domain.name/config/server.xml
Register the Sample servlet.
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:
<servlet> <servlet-name>SSOTokenSampleServlet</servlet-name> <description>SSOTokenSampleServlet</description> <servlet-class>SSOTokenSampleServlet</servlet-class> </servlet>
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>
Restart the Access Manager server.
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.
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.