Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Undeploying portlets
14536, modificat fa 21 anys.
New Member
Apunts: 20
Data d'incorporació: 30/11/04
Publicacions recents
I would like to ask, if there is any way to undeploy a portlet.<br /><br />I have deployed a portlet, that is somehow invalid and everytime I start liferay portal, it does not run properly...<br /><br />Should I remove some directory or is there a command for "ant" that allows to undeploy?<br /><br />Thanks a lot!<br /><br />(PS: I use both Tomcat and JBoss-Tomcat servers)
13086, modificat fa 21 anys.
Liferay Legend
Apunts: 1254
Data d'incorporació: 18/08/04
Publicacions recents
Using your container's normal webapp undeploy method should properly undeploy a hot-deployed portlet. This can sometimes be deleting the WAR file from your containers deploy directory.
14316, modificat fa 21 anys.
Regular Member
Apunts: 106
Data d'incorporació: 19/11/04
Publicacions recents
Hi<br /><br />For Tomcat-JBoss:<br />if you don´t use the ext-evironment for developing but<br />use ant deploy from /ext/portlet it´s very easy.<br />Go to www/ext/servers/jboss-tomcat/server/default/deploy<br />and delete the directory with the name of your portlet (Directory-Name like<br />"1yourportlet.war")<br /><br />Peter
14536, modificat fa 21 anys.
New Member
Apunts: 20
Data d'incorporació: 30/11/04
Publicacions recents
thanks!
13586, modificat fa 21 anys.
New Member
Apunts: 5
Data d'incorporació: 18/09/04
Publicacions recents
Using your container's normal webapp undeploy method should properly undeploy a hot-deployed portlet. This can sometimes be deleting the WAR file from your containers deploy directory.<br /><br /><br /><br />Hi, <br /><br />I use Tomcat 5.0.28 and deploy a simple portlet into it without any error!<br />When I want to delete this portlet (delete the directory from tomcat/webapps), I need to restart the tomcat to see the change (portlet disappear from portlet list).<br />Is it the normal case?<br /><br />But when I change the portlet display name in portlet.xml and re-deploy it. <br />The portlet appear again but with old name! <br />Even I drop and re-create the whole database "lportal"!!!<br /><br />How can I do?
15281, modificat fa 21 anys.
New Member
Apunts: 3
Data d'incorporació: 07/01/05
Publicacions recents
I would like to ask, if there is any way to undeploy a portlet.<br /><br />I have deployed a portlet, that is somehow invalid and everytime I start liferay portal, it does not run properly...<br /><br />Should I remove some directory or is there a command for "ant" that allows to undeploy?<br /><br />Thanks a lot!<br /><br />(PS: I use both Tomcat and JBoss-Tomcat servers)<br /><br /><br /><br />I have had this problem many times. If your "bad portlet" is in mystuff.war in ../servers/jboss-tomcat/server/default/deploy, removing the mystuff.war directory will help. I'm not sure you're completely home free though. The portal itself may complain because it thinks it should show the missing portlet on a page. I guess it depends on whether you've added the portlet to a page or just broken it by adding the war file.
13086, modificat fa 21 anys.
Liferay Legend
Apunts: 1254
Data d'incorporació: 18/08/04
Publicacions recents
The portal detects the contextDestroyed event, through a listener it installs into the portlet webapp during a hot-deploy. This event is supposed to "hot undeploy" the portlet when its context is destroyed.<br /><br />I see your point - the undeploy seems to be leaving parts of the portlet still visible to the portal, e.g. it remains in list of portlets. I'm not sure if this has always been the case or is a new bug.
13586, modificat fa 21 anys.
New Member
Apunts: 5
Data d'incorporació: 18/09/04
Publicacions recents
The portal detects the contextDestroyed event, through a listener it installs into the portlet webapp during a hot-deploy. This event is supposed to "hot undeploy" the portlet when its context is destroyed.<br /><br />I see your point - the undeploy seems to be leaving parts of the portlet still visible to the portal, e.g. it remains in list of portlets. I'm not sure if this has always been the case or is a new bug.<br /><br /><br /><br />Hi, <br /><br />In my situation, when I delete the portlet directory in webapps (in Tomcat) and restart the server, portlet is gone (in portlet list).<br />But:<br />1. Some data (like perference) are still left in DB.<br />2. When I re-deploy same portlet (ID) with different display-name, old name is shown.
13086, modificat fa 21 anys.
Liferay Legend
Apunts: 1254
Data d'incorporació: 18/08/04
Publicacions recents
There does seem to be something missing from the actions that take place during contextDestroyed. The hot-deployed portlet instance is not completely removed from the portal.
14801, modificat fa 21 anys.
Junior Member
Apunts: 34
Data d'incorporació: 14/12/04
Publicacions recents
Using your container's normal webapp undeploy method should properly undeploy a hot-deployed portlet. This can sometimes be deleting the WAR file from your containers deploy directory.<br /><br /><br /><br />With jboss-tomcat, I could simply remove war file and have it undeployed that way. Is there any file (perhaps config files) outside portlet war that we need to update to completely undeploy a portlet?<br />
13086, modificat fa 21 anys.
Liferay Legend
Apunts: 1254
Data d'incorporació: 18/08/04
Publicacions recents
Yes, this is to do with the fact that the work done by PortletContextListener.contextDestroyed() is not complete. I haven't had a chance to submit an enhancement request and patch as yet. The portlet pooling mechanism is quite complex.<br /><br />The only way to fully undeploy a hot-deployed portlet at the moment AFAIK is to restart the container, as the portlet pool is maintaining a reference to the portlet. The correct place to fix this is PortletContextListener.contextDestroyed().<br />
14536, modificat fa 21 anys.
New Member
Apunts: 20
Data d'incorporació: 30/11/04
Publicacions recents
Hi everyone,<br /><br />I am using liferay portal via Eclipse and JBoss. Could somebody help me to undeploy a portlet (= project) from it?<br /><br />I removed my project from the Eclipse and deleted the folder in /eclipse/workspace but server is still looking for the source.<br /><br />Thank you<br /><br />JM<br /><br /><br /><br /><br />
13086, modificat fa 21 anys.
Liferay Legend
Apunts: 1254
Data d'incorporació: 18/08/04
Publicacions recents
Your portlet WAR may still be deployed under /server/default/deploy. Check there and remove it if present.
14536, modificat fa 21 anys.
New Member
Apunts: 20
Data d'incorporació: 30/11/04
Publicacions recents
In Eclipse it does not work this way. The portlet is deployed into itself (everything is kept in the project MyPortlet), it does not create any .war folders in the server.<br /><br />I tried to delete any mention of MyPortlet in the JBoss (default/work/MyPortlet/ and default/conf/MyPortlet.xml) but now the server does not start at all.<br /><br />Could anyone help?<br /><br />Thanks a lot.<br /><br />JM<br /><br /><br /><br />
Community
Company
Feedback