Runtime components : Channels components : Java Client/Server Messaging APIs : Tasks : Establishing a secured session based on a proxy security server : Executing the application in the secured session : Using a Java client within a browser
  
Using a Java client within a browser
To execute an application that uses a Java client within a Web browser, the application may need to provide the client with a security cookie before it can establish the session. This occurs when the browser performs the authentication due to a security challenge that occurs before the client application takes control. In this case, the application needs to obtain one or more cookies from the proxy security infrastructure and then provide the CSClient service with the cookie.
To provide the CSClient with a single cookie, use code like the following example:
((CSClientService)CSClient.getCSClient("realCSClient")
.addCSConnectionCookies(clientCookieStr);
To provide the CSClient with a more than one cookie in a Vector of Strings use code like the following example:
((CSClientService)CSClient.getCSClient("realCSClient")
.addCSConnectionCookies(clientCookiesVector);
The format of the Strings is cookieName="cookieValue".
As the client later resends the cookies, you only need to do this step once prior to establishing the session.
Go up to
Executing the application in the secured session