How to configure ambient framework within a Tridion CWA web app
Asked Answered
D

1

6

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.

Deflate answered 6/2, 2013 at 18:35 Comment(2)
Hi Sébastien - You seem to have a great Tridion knowledge based on some of your answers here on SO. Would you consider committing to the SDL Tridion Area 51 proposal at area51.stackexchange.com/proposals/38335/… using your SO account - The SDL Tridion community really needs all the support we can get. ThanksSalvucci
Hi Chris. It's done ;)Proprietress
B
4

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)

Broddie answered 6/2, 2013 at 19:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.