Friday, April 20, 2012

How to deploy portlet in CQ5.5

Use Case: You want to deploy portet in CQ5.5

Prerequisite: Above
document covers most of the part. I will cover what is changed in CQ5.5

There is no servlet engine UI. So you can not deploy your portlet application using Day servlet engine any more.

 Here is steps to deploy portlet war file in CQ5.5

 1) Chose any servlet engine of your choice. I am taking example of tomcat in this case
 2) Deploy your CQ war file using instruction given in
 3) Install package given in /opt/portal/ using CQ package manager
 4) Using webDav copy /libs/portal/director/cq-portlet-director-sharedlibs.*.jar in put it in your shared lib directory of your servlet container (I put it in /libs folder of tomcat) 
5) Now take cq-portlet-webapp-*.war (This is just an example war for OOTB portlet) and deploy it in your servlet container (In my case I just put it in webapps folder of tomcat)
6) After deploying make sure that it is accesible using http://HOST:PORT/cqportlet/cqbridge/system/console
7) Now follow instruction in the Portlet and give your CQ end point.
8) Now go to web.xml of your portlet war file and add following entry


9) Then add portlet component and test as given in CQ as a Portal

Portlet support is very limited in CQ5.5, So unless it is absolutely required, do not use it.

Note: As always, Please test before using this to production