Runtime tools : Service components : Smart channel services : Smart data collector : Client collector
  
Client collector
The UDTT Smart client-side data collectors provide API to help collect the data from client and send to server side in order to record data into database.
Following are the general steps for smart client collector:
1 Add following jars into the web project: bttsmartchannel.jar, bttweb2collector.jar, bttweb2.jar, bttcore.jar, dwr.jar into the java build path and Java EE module.
2 Install Web2.0 feature pack for WAS, and copy the JSON4J.jar into the EAR project, and add it as the web project library. The JSON4J.jar is located at ${app_server_root}\web2fep\optionalLibraries\JSON4J.
3 Download the dwr.jar and copy it into the EAR project, and add it as the web project library. DWR is available under the Apache Software License v2 (http://www.apache.org/licenses/LICENSE-2.0.html). Download the file dwr.jar from http://directwebremoting.org/dwr/downloads/index.html.
4 Configure the DWR. See:
http://directwebremoting.org/dwr/introduction/getting-started.html
for more information. Following is the example used in the sample:
5 Create dwr.xml file under the WEB-INF folder in the web project, and add the following code:
<dwr>
<allow>
<create creator="new" javascript="SmartDataHandler">
<param name="class"
value="com.ibm.btt.channel.smart.web2.client.SmartDataHandler"/>
</create>
<create creator="new" javascript="SmartJMSDataHandler">
<param name="class"
value="com.ibm.btt.channel.smart.web2.client.SmartJMSDataHandler"/>
</create>
</allow>
</dwr>
Add following code to the web.xml file:
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param> <param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>activeReverseAjaxEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>initApplicationScopeCreatorsAtStartup</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxWaitAfterWrite</param-name>
<param-value>100</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet><servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
See
Smart visit client collector
Smart preference client collector
Smart behavior client collector
Go up to
Smart data collector