The UDTT Smart preference client collector provides API to help collect the data when users save the interested business items. To add smart preference client collector to project to collect the data when users save the interested business items, you can:
2 Copy the file clientCollector.jsp from the bttweb2collector/client/collector directory into the web directory of the web project. Add bttweb2.jar into the build path and Java EE Module Dependencies of the web project. Update the following code according to the real project:
The profileRootPath is the root path of all the user profiles. In this sample, the profiles are located at the BTTXMLfolder.
The daoConfigPath is the path of the Web2ProfileDAO.xml. This file is packaged in the profileDefinitions folder of the bttweb2collector.jar. You can also copy it into your project, and then configure the real path in the daoConfigPath.
The daoIdis the id of the profileDAO pattern of the UDTT web2.0 framework. There are two patterns: BTTWeb2ProfileFileDAOand BTTWeb2ProfileDB2DAO.
3 Integrate the clientCollector.jsp file into the web page in which the preference data is collected. Following is the sample code: