Undeploying portlets

This article assumes that the portlet to be undeployed is an application, that is, it is not part of Liferay itself, or a Liferay customization. To be clearer, the portlet code does not live inside the Liferay directory (in Tomcat, {$TOMCAT}/webapps/ROOT).

Liferay itself does not have any functionality to undeploy a portlet. It depends on the application server.

Some common libraries living within an application may be in use during the undeployment, so it may not be possible to remove them, and that may make impossible to fully undeploy the application.

The safest way to undeploy a portlet is:

  1. Stop the Liferay application (see your own application server documentation).
  2. Undeploy the portlet application (see your own application server documentation).
  3. Re-start the application server.

You should also delete the corresponding rows in portletpreference table of the database.

Tip: If you would rather not modify data in your database directly, the safest way to remove portletpreferences data is to find all instances of the portlet and remove them from every page. By doing this you are also removing references to the portlet in the 'layout' table.

Redeploying portlets#


If you decided not to follow the previous procedure, Tomcat cannot effectively refresh its cache after a portlet being redeployed. You will have to shutdown Tomcat and delete the tomcat\work\Catalina directory after redeployed my portlet.

Hot redeploying to /home/liferay/deploy/ may not work properly, because the JSP pages may not refresh properly. Hot deploying to /webapps refreshes the JSP's much better.

0 Attachments
Average (0 Votes)
The average rating is 0.0 stars out of 5.