I have included the following line of code in the jsp file,
<cq:include path="clientcontext" resourceType="cq/personalization/components/clientcontext"/>
After including the above line, I start getting the following error. Please help me in resolving this error:
Error during include of component '/apps/cq/personalization/components/clientcontext'
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.day.cq.wcm.api.AuthoringUIMode resolves to a package
Solved! Go to Solution.
What version of AEM are you using? What, if any, feature packs and hotfixes have been installed? What differences exist between /apps/cq/personalization/components/clientcontext and /libs/cq/personalization/components/clientcontext (IIOW, why was the /apps copy created?)?
Thanks for a quick response. I am using AEM version 5.6.2. This code base I got from the client. I don't know for what purpose they kept the clientcontext in apps folder also. But there are differences between clientcontext component present inside lib folder & apps folder. When I try to include it from libs folder, it's working fine now.
Once again, thanks a lot for your help.