Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure ambient framework within a Tridion CWA web app

I'm adding ambient framework within an existing Tridion CWA Java web application and I have some questions regarding the mapping of java filters (ambient framework filter vs CWA filters)

In the SDL CWA 2011 SP1 documentation (online portal) they say:

16 - If you intend to use the Ambient Data Framework in combination with CWA, also open the web.xml file in the WEB-INF/ folder and add the following:

<filter>
  <filter-name>Ambient Data Framework</filter-name>
  <filter-class>com.tridion.ambientdata.web.AmbientDataServletFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>Ambient Data Framework</filter-name>
  <servlet-name>Content Delivery Web service</servlet-name>
</filter-mapping>

I don't understand this filter-mapping. In my web-app there is no Content Delivery Web Service.

My questions:

1 - Does it means Ambient Data Framework requires the installation of the Content Delivery Web Service to work ? For me the filter-mapping of Ambient Data filter should be the same as the mapping of CWA request filter

<filter-mapping>
  <filter-name>cwa</filter-name>
  <url-pattern>my-mapping</url-pattern>
</filter-mapping>
<filter-mapping>
   <filter-name>Ambient Data Framework</filter-name>
   <servlet-name>my-maping</servlet-name>
</filter-mapping>

2 - What about PageFileDistributionFilter & BinaryFileDistributionFilter ?

3 - Is there a recommanded filter order ? CWA filters configured before Ambient Data filter for ex ?

Any help would be much appreciated. Thanks in advance.

like image 903
Sébastien PRAT Avatar asked Feb 06 '13 18:02

Sébastien PRAT


1 Answers

On #1: It's a documentation defect, it should be this instead:

<filter>
  <filter-name>Ambient Data Framework</filter-name>
  <filter-class>com.tridion.ambientdata.web.AmbientDataServletFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>Ambient Data Framework</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

On #2, yes you still need those two of course.

On #3, I suspect you should have the Ambient Framework loaded first, as that is the recommendation for non-CWA web apps (your filters could use the Ambient Framework, for instance)

like image 178
Nuno Linhares Avatar answered Jan 02 '23 21:01

Nuno Linhares