Hot answers tagged

11

The shortest possible SmartTarget promotions implementation with JSP tags is as follows. This indeed looks a lot like the TCDL tags. source <smarttarget:query siteEditTagName="span" publication="tcm:0-72-1"> <smarttarget:promotions region="Homepage Banners" maxItems="1"> <smarttarget:itemTemplate> <...


9

After doing some research I have found that the problem is most often associated with a missing cd_wai.jar file, which houses the Admin.class file. However, this was not my problem. After searching through the various folders I saw that we were missing the cd_wai_conf.xml (configuration) file which resolved the issue.


6

Publication target language "REL" means that the deployer is expected not to convert the tcdl tags to JSP custom taglib directives; also see the SDL tridion 2013 online documentation. Instead these get executed by the PageContentAssembler and the ComponentPresentationAssembler at request time; if you are publishing flat JSP pages from Tridion to your webapp ...


6

The issue here appears to be having URL in the Link text. Current implementation of CIL does encode link text but since we have URL, it needs double encoding so that CIS can handle the request. As a workaround, this link text can be encoded before passing it to the API. As a result, the response will contain encoded link text which needs to be decoded again....


5

If you're publishing to the filesystem, then you'll need to set the Component Template to output JSP, use the ComponentPresentationAssembler class and ensure that the DCPs are being published to a sub-directory of your website by the Deployer. If you're publishing as REL, you'll need to set the Component Template to output REL, configure the Deployer to ...


4

It's not clear from your question how you're storing the DCPs. It seems like you might be storing them in the database, in which case the code will indeed not be executed. To execute code in DCPs you must either: Use REL instead of JSP as your execution language Publish the DCPs to the file system Can you share your storage configuration? UPDATE Since ...


4

There is a TLD file on the CD layout (Content Delivery\java\web\tld) which provides the list of tags, their attributes, and remarks explaining the purpose of each of them. Combine that with the API documentation available on LiveContent (login required) and you should have a complete picture on how to use the tags in your web application.


3

The JSP EL (Expression Language) makes no provisions for accessing class constant values, so there is no means to easily replace the scriptlet expressions that reference the class constants representing the element names, with scriptless EL expressions. As mentioned in the following article http://www.javaranch.com/journal/200601/Journal200601.jsp#a3, since ...


3

Seems like a documentation bug to me. I just tried this on a JSP and got the expected results. <% ComponentPresentationAssembler cpa = new ComponentPresentationAssembler(28); String content = cpa.getContent(2729,2747); out.write("Output is: " + content); %> You may want to open a ticket for a documentation defect.


3

The pageModel.meta is defined for the HTML meta tags, it is actually not supposed to map to the CMS Page metadata. For mapping CMS Page metadata, you should extend the default Page Model and add these fields yourself, just like you do in Entity Models.


3

The ComponentPresentationAssembler needs access to your page context to work, so the constructor overload that accepts just the publication id won't work. You need to instantiate a JSPPage with the pageContext and pass that in. com.tridion.web.jsp.JSPPage dcdPage = new com.tridion.web.jsp.JSPPage(pageContext, "tcm:127-507637-64"); ...


2

Finally, Found the culprit it's a config issue values are not correct: Before: <Property Name="tcdl.target.language" Value="jsp" /> <Property Name="tcdl.target.language" Value="rel"/> Correct config: <Property Name="tcdl.target.language" Value="rel"/> <Property Name="tcdl.page.target.language" Value="jsp" /> Refer to ...


2

In general, the datatype Float has limited precision; it has a huge range, but it is not possible to represent every integer value within that range. So, in general, exact matches on float values are tricky: you may get both false positive and false negative matches. Bottom line: if you want to do exact matches, you should not use datatype Float (nor ...


2

I played around with executing DCPs containing code that are stored in the Content Delivery Database. The idea is to have custom class-loaders that interpret the 'string' coming from the DB as code and compile it dynamically in memory. Once you have the byte-code in memory, then you can simply instantiate an object from it (that's where the class-loader ...


2

The site I was testing has UI installed and I was checking the staging one. When checking a different site with no UI installed, I saw that in the log files there was no tridion logging until I really browsed to a page. Just to be sure I tested a 3rd site which also has UI installed, this had the same logging on staging as the initial site, meaning the ...


2

Most web application frameworks (such as spring) provide loads of ways to trigger custom java code when your application starts. All you have to do is to trigger something tridionny - like resolving a 0 link - to start up the storage manager. Alternatively, having a monitoring system that polls a URL that does a tridion call will have the same effect whilst ...


2

If you are not using JSP or ASP.NET, you might be better off using REL instead of trying to use the tags. When using REL, the web service will render everything and just return the resulting HTML. For information on how to work with REL in SmartTarget, see the following section of the documentation: SmartTargetTarget TCDL tag reference (REL)


2

The reason this is happening is that you are sending all JSP files through the dispatcher. The dispatcher then finds the RequestMapping attribute on the PageContoller and lets it try to handle the request. This means that when Spring MVC requests a View, instead of being allowed to load the View, it is treated like a webpage. The PageController tries to ...


1

This is fixed in dd4t-java version 2.0.6. Any class you want to deserialize page data into must implement the org.dd4t.contentmodel.Page interface or extend the PageImpl class: public class MyPageImpl implements Page { // Code here } The PageFactory class has two new methods: <T extends Page> T getPage(final String uri, final Class<T> ...


1

What it is trying to do here is downcasting, which is not really a good idea. Simple Example: PageImpl is Animal TwoColPage is Cat Not all Animals are Cats, so the compiler throws an error The problem comes from this line in PageFactoryImpl page = deserialize(pageSource, PageImpl.class); It fixes the type of Page to PageImpl meaning the page (Super ...


1

Once a while I had almost similar issue with ComponentPresentationAssembler. I was not able to resolve component links in dynamic templates. Adding <%@ taglib uri="cd_tags" prefix="tridion" %> in dynamic templates resolved code execution. If you consume something out of tridion libraries, maybe you can check to specify invocation in your template same ...


Only top voted, non community-wiki answers of a minimum length are eligible