Read ADF cookie names though the Tridion CD API.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd">
<!-- Cookies settings (optional) -->
<!--
<Cookies>
<CookieClaim DefaultValue="true" Name="CookieClaim"/>
<Cookie Type="Tracking" Name="myTrackingCookie" Path="/"/>
<Cookie Type="Session" Name="mySessionCookie" Path="/"/>
</Cookies>
-->
</Configuration>
<!-- Jan Horsman September 2014
This example shows how to read the ADF cookie names through the Tridion Content Delivery API.
The names of the ADF cookies can be configured in the cd_ambient_conf.xml and have default values
in case no cookie name is configured.
The com.tridion.ambientdata.AmbientDataConfig is internal API since it is not documented in the
Tridion CD API docs.
Works with SDL Tridion 2013 SP1 and likely with some earlier Tridion versions as well.
-->
<%@ page import="com.tridion.ambientdata.*" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title></title>
</head>
<body>
<%
AmbientDataConfig conf = new AmbientDataConfig();
CookieConfig cookieConfig;
cookieConfig = conf.getCookieConfiguration(CookieConfig.CookieType.SESSION);
String TAFSessionIdCookieName = cookieConfig.getCookieName();
String TAFSessionIdCookiePath = cookieConfig.getPath();
%>
<strong>ADF session id cookie</strong>
<ul>
<li>cookie name: <%=TAFSessionIdCookieName%></li>
<li>cookie path: <%=TAFSessionIdCookiePath%></li>
</ul>
<%
cookieConfig = conf.getCookieConfiguration(CookieConfig.CookieType.TRACKING);
String TAFTrackingIdCookieName = cookieConfig.getCookieName();
String TAFTrackingIdCookiePath = cookieConfig.getPath();
%>
<br/>
<strong>ADF tracking id cookie</strong>
<ul>
<li>cookie name: <%=TAFTrackingIdCookieName%></li>
<li>cookie path: <%=TAFTrackingIdCookiePath%></li>
</ul>
</body>
</html>