This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Undeploying portlets
Table of Contents [-]
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:
- Stop the Liferay application (see your own application server documentation).
- Undeploy the portlet application (see your own application server documentation).
- 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#
Tomcat#
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.