I have a tricky one for the hardcore Tridion CD people here...
I want to load and enrich a User
's CustomerCharacteristics
from an Ambient Data Cartridge, but been struggling to find a way to load/find this object.
The correct way of loading a user is to use:
JSPPage jspPage = new JSPPage(pageContext, "tcm:1-2-64");
User user = jspPage.getUser();
But in the context of a cartridge I am running before the page, and I don't have access to the pageContext object. Or do I?
Does anyone know a way to get the PageContext object for a page from a filter? And would there be an easy-ish way to make this object available to a Cartridge?
PageContext
myself once, but that was a long time ago, and there I really needed it for theOut
(orJspWriter
) property. You might want to decompileJSPPage.getUser()
and see what is all done in there and see if you can get to that without aPageContext
orJSPPage
.