How to get ltpa token

heard you can get an LTPA token once I logged on to a Domino server. I use a combination of Tomcat servlets & Domino. I only want to use the LTPA token to create a new session under the logged-on user in Domino through a servlet. How can I get this token again. I use Singel Signon in Domino, and the user always first has to authenticate a first time in Domino

Subject: How to get ltpa token

With SSO, Domino stores a Cookie on the Client (browser) LtpaToken. You can read the cookie and use it on the createSession:

  Cookie[] cookies = null;

  String sessionToken = null;

  cookies = request.getCookies(); 

  if (cookies == null)

        s1 = "No cookies received";

  else {

      for (int i = 0; i < cookies.length; i++)

        {

        String cookie = cookies[i].getName();

        if (cookie.equals("LtpaToken"))

           {

           sessionToken = cookies [i].getValue();

        }

      } // end else

     

  if (sessionToken != null)

     {

     NotesThread.sinitThread();

     try {

        Session session = NotesFactory.createSession(null, sessionToken);