I have to get ThemeDisplay() in web-content to compare page title. I am using <#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()>
To get service context, but it's throwing freemarker exception mentioned below:
No error description was specified for this error; low-level message: java.lang.ClassNotFoundException: com.liferay.portal.kernel.service.ServiceContext cannot be found by com.liferay.portal.template.freemarker_2.0.29 ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign service = staticUtil["com.lif... [in template "20155#20195#54243" at line 21, column 1] ----
FYI: I already enabled freemarker engine setting in control panel freemarker engine. Also in portal-ext.properties file.