3

My published JSP page contains smarttarget tags. When I access the same page in my application, in the logs I could see that the fredhopper query executes and returns the required promotions, but no content is displayed on page.

My query here is as follows: How does the smart target Library get the HTML content for promotional items from Broker DB. Is these data populated in an impplicit JSP object on which I need to write code for the HTML to be displayed on page.

I could also see some ERROR elements in my logs. Kindly find the attached logs and provide some pointers for the same.

42543604 2015-06-19 01:43:29.869 [FutureTask - 32] DEBUG com.tridion.smarttarget.query.Query - Promotion: [Chrome BrowserPromotion] with [1] number of items for region [Homepage Promotions] 42543605 2015-06-19 01:43:29.870 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.TimeoutQueryRunner - Query result retrieved from fredhopper in: 92 ms. 42543605 2015-06-19 01:43:29.870 [http-bio-8090-exec-5] TRACE com.tridion.smarttarget.performance.Stopwatches - Performance result [thread: 32] 'QueryTag.ExecuteQuery': 92 milliseconds. 42543605 2015-06-19 01:43:29.870 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.query.ResultSet - ItemsTotalCount = 59. 42543605 2015-06-19 01:43:29.870 [http-bio-8090-exec-5] ERROR com.tridion.smarttarget.tags.SearchTagHandler - The attribute 'value' is required with search type set to 'keyword'. 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.query.ResultSet - Showing item 'tcm_2478-477224-16_tcm_2478-477229-32' as part of Experiment/Promotion 'JSP Chrome '. 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.query.ResultSet - Showing item 'tcm_2478-477225-16_tcm_2478-477229-32' as part of Experiment/Promotion 'Chrome BrowserPromotion'. 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.utils.AmbientDataHelper - Creating new data for component presentation [tcm_2478-477224-16_tcm_2478-477229-32] 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.PromotionsTagHandler - Adding Promotion [JSP Chrome ] with [1] item(s). 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.utils.AmbientDataHelper - Creating new data for component presentation [tcm_2478-477225-16_tcm_2478-477229-32] 42543606 2015-06-19 01:43:29.871 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.PromotionsTagHandler - Adding Promotion [Chrome BrowserPromotion] with [1] item(s). 42543615 2015-06-19 01:43:29.880 [http-bio-8090-exec-5] DEBUG com.tridion.ambientdata.claimstore.ClaimStore - put: uri=taf:claim.ambientdata:smarttarget:promotions, value={tcm_2478-477224-16_tcm_2478-477229-32={componentUri=tcm:2478-477224-16, templateUri=tcm:2478-477229-32, regions={Homepage Promotions={9b03c9be-c7a5-47a6-80c8-7204d88501d1={slogan=, title=, name=JSP Chrome }}}}, tcm_2478-477225-16_tcm_2478-477229-32={componentUri=tcm:2478-477225-16, templateUri=tcm:2478-477229-32, regions={Homepage Promotions={0766b17c-e6a8-40df-ac35-1f6905e6fd4c={slogan=, title=, name=Chrome BrowserPromotion}}}}} 42543615 2015-06-19 01:43:29.880 [http-bio-8090-exec-5] DEBUG com.tridion.ambientdata.claimstore.ClaimStore - Setting ad-hoc scope to REQUEST for claim: taf:claim.ambientdata:smarttarget:promotions 42543615 2015-06-19 01:43:29.880 [http-bio-8090-exec-5] TRACE com.tridion.smarttarget.performance.Stopwatches - Performance result [thread: 32] 'PromotionsTagHandler.FilterPromotions': 10 milliseconds. 42543615 2015-06-19 01:43:29.880 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.ItemTemplateTagHandler - preparing to loop over 2 objects 42543615 2015-06-19 01:43:29.880 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.ItemTemplateTagHandler - preparing to loop over 1 objects 42543616 2015-06-19 01:43:29.881 [http-bio-8090-exec-5] TRACE com.tridion.smarttarget.performance.Stopwatches - Performance result [thread: 32] 'PromotionalItemsTagHandler.ShowPromotions': 1 milliseconds. 42543616 2015-06-19 01:43:29.881 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.ItemTemplateTagHandler - preparing to loop over 1 objects 42543616 2015-06-19 01:43:29.881 [http-bio-8090-exec-5] TRACE com.tridion.smarttarget.performance.Stopwatches - Performance result [thread: 32] 'PromotionalItemsTagHandler.ShowPromotions': 0 milliseconds. 42543616 2015-06-19 01:43:29.881 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.FallbackContentTagHandler - There is a result present, skipping fallback content body 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.NavigationTagHandler - Second pass 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.NavigationTagHandler - Found valid Navigation object in the PageContext. (2 sections) 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.ItemTemplateTagHandler - preparing to loop over 0 objects 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.ItemTemplateTagHandler - preparing to loop over 3 objects 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] DEBUG com.tridion.smarttarget.tags.QueryTagHandler - The query tag handling took: 126 ms. to render 42543617 2015-06-19 01:43:29.882 [http-bio-8090-exec-5] TRACE com.tridion.smarttarget.performance.Stopwatches - Performance result [thread: 32] 'QueryTagHandler.Overall': 126 milliseconds. 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] DEBUG com.tridion.ambientdata.web.AmbientDataServletFilter - Dispatching onRequestEnd event 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removing REQUEST scoped claims from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:request:parameters from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:server:variables from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:request:full_url from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:claim:ambientdata:sessioncartridge:authorization:isauthenticated from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:claim.ambientdata:smarttarget:promotions from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:request:cookies from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:request:headers from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:request:uri from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] TRACE com.tridion.ambientdata.claimstore.ClaimStore - Removed claim taf:session:attributes from ClaimStore 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] DEBUG com.tridion.ambientdata.web.WebContext - setCurrentClaimStore: null, thread: http-bio-8090-exec-5 42543618 2015-06-19 01:43:29.883 [http-bio-8090-exec-5] INFO com.merck.epublish.common.web.MerckWebRequestFilter - EXIT WebRequestFilter after 7808 millis

Thanks in advance.


Thanks for the response. PFB the smart target tags we are trying to process in the JSP.

<%@ taglib uri="/WEB-INF/taglibs/smarttarget.tld" prefix="smarttarget" %> --> sample jsp

MCI Wegnerton - Home Page

<table>
    <tr>

            <smarttarget:query publication="tcm:0-XXXX-1"> 
            <!--    <smarttarget:search type="keyword"></smarttarget:search> -->
                <smarttarget:promotions region="Homepage Promotions" var="promotion" maxItems="3"> 
                    <smarttarget:itemTemplate> 
                        <smarttarget:promotionalItems> 
                            <smarttarget:itemTemplate> 
                                    <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="${item.componentUri}" templateURI="${item.templateUri}"/> 
                            </smarttarget:itemTemplate> 
                        </smarttarget:promotionalItems> 
                    </smarttarget:itemTemplate> 
                    <smarttarget:fallbackContent> 


        <td>
            <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="tcm:XXXX-XXXX" templateURI="tcm:XXXX-XXXX-32"/>            </td>

        <td>
            <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="tcm:XXXX-XXX" templateURI="tcm:XXXX-XXXX-32"/>            </td>

        <td>
            <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="tcm:XXXX-XXXX" templateURI="tcm:XXXX-XXXX-32"/>            </td>


                    </smarttarget:fallbackContent> 
                </smarttarget:promotions> 

                <smarttarget:navigation showCategories="false" var="sections"> 
                    <smarttarget:itemTemplate> 
                        <smarttarget:navigationSection var="section" section="${section}"> 
                            <smarttarget:itemTemplate> 
                                <smarttarget:navigationLink showNumberOfItems="true" link="${link}"></smarttarget:navigationLink> 
                            </smarttarget:itemTemplate> 
                        </smarttarget:navigationSection> 
                    </smarttarget:itemTemplate> 
                </smarttarget:navigation> 

                <smarttarget:items var="searchResult" maxItems="3"> 
                    <smarttarget:itemTemplate> 
                        <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="${searchResult.componentUri}" templateURI="${searchResult.templateUri}"/> 
                    </smarttarget:itemTemplate> 
                </smarttarget:items> 

            </smarttarget:query> 
                    </tr>
</table>


 View Source
    <tr>

                                    <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="tcm:XXXX-477224-16" templateURI="tcm:XXXX-XXXX-32"/> 


                                    <tridion:ComponentPresentation pageURI="tcm:XXXX-XXXX-64" componentURI="tcm:XXXX-477225-16" templateURI="tcm:XXXX-XXXX-32"/> 
-->

When I do a view-source(attached here), the smart target tags disappear and I see two tridion tags as result of the Fredhopper query(they contain the same component ID as the ID of the item Fredhopper). I tried to process the tag by using cd_tags.tld but could not get the expected result. My query is that: Do the tags get the required HTML by connecting to Broker DB from the application directly. If yes, then how do I configure my web application to connect to Broker DB directly as it does not do so according to project architecture.

Thanks.

  • What does your rendered markup with SmartTarget tags and query look like? Also, what do the matching Component Presentations look like (i.e. could they be displayed but have an issue with markup)? – Alvin Reyes Jun 22 '15 at 2:43
  • FYI -- I moderated your additional feedback by moving it from an answer into your original question, Mark. StackExchange appended the exact text to the original question, starting at the break. Thanks for following up with additional information. – Alvin Reyes Jun 22 '15 at 17:36
0

It could be as simple as you just missing the import at the top of your file:

<%@ taglib uri="cd_tags" prefix="tridion" %>

When SmartTarget outputs the Promotion, it will typically use the tridion:ComponentPresentation tag to render the Component Presentations. Your problem seems to be that you have not enabled those tags to be executed in your JSP page.

I suggest that you isolate the problem by creating a simple JSP page that just has that tridion:ComponentPresentation tag (and any glue you need around it). And follow the steps in the documentation until you see it render correctly. Then add the SmartTarget tags back in and everything should work.

| improve this answer | |
  • Thanks Peter. The linked above helped me resolve the issue. I was missing the cd_dynamic_conf.xml file. – Mark Thomas Jun 23 '15 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.