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
Deploying a war file
تم تعديل 17546 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 12
تاريخ الإنضمام: 16/3/05
المشاركات الحديثة
Hi - I'm using Liferay Professional (Tomcat) and I'd like to know if it's possible to simply drop a file in some directory and have it auto deploy. I've spent a fair amount of time trying to get this to work, without any success.<br /><br />Any hints would be greatly appreciated.<br /><br />ct
تم تعديل 13086 منذ 21 سنوات من الدقائق.
Liferay Legend
المشاركات: 1254
تاريخ الإنضمام: 18/8/04
المشاركات الحديثة
I assume the WAR file you are referring to is a portlet-application to be hot-deployed. In that case, Liferay needs to "enhance" the WAR file to allow it to integrate with the portal, prior to deployment. There is a class and Ant script to facilitate this.<br /><br />Once enhanced, you can either keep the WAR deployed, or alternatively you could WAR it back up again and re-deploy it with Tomcat's auto-deployer at a later time.
تم تعديل 17546 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 12
تاريخ الإنضمام: 16/3/05
المشاركات الحديثة
Hi Brett,<br />Sorry, yeah - it's a portlet application. What I wasn't clear on was what directory should I place the war file in (let's say Liferay is installed in $LR_HOME)<br /><br />Can you say a little more about this "enhancement". What gets added to or changed in the war file?<br /><br />Can you confirm that I don't need to edit any files like $LR_HOME/liferay/WEB-INF/liferay-portlet.xml or liferay-portlet-ext.xml<br /><br />Thanks a million,<br />ct
تم تعديل 17516 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 11
تاريخ الإنضمام: 26/4/05
المشاركات الحديثة
Hi Ciaran, you could deploy your war file in the directory c:\sourceforge\liferay\ext\portlets\ . Afterthat, you should make an >ant deploy within the directory.<br /><br />Finally, you can start up the server and test that the file.war is deployed
تم تعديل 17546 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 12
تاريخ الإنضمام: 16/3/05
المشاركات الحديثة
Hi,<br />The C:\sourceforge\liferay you're referring to - is that the liferay source code, or is it the extracted liferay-pro-3.2.0.zip directory?<br /><br />Can I deploy without having to use that ant script? Can I simply make the war file myself (using Eclipse) and copy it into some deploy directory?<br /><br />Thanks for the help<br />ct
تم تعديل 17516 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 11
تاريخ الإنضمام: 26/4/05
المشاركات الحديثة
yep, just copy your war file in the extension liferay portal .../portlet and in this directory make an >ant deploy. <br /><br />Afterthat, your application will be deployed and just run the server and test if it works
تم تعديل 17546 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 12
تاريخ الإنضمام: 16/3/05
المشاركات الحديثة
Sorry for more dumb questions:<br />1. Where is the "extension liferay portal" directory relative to my liferay-pro-3.2.0 directory?<br />2. You mention "> ant deploy" - Is there any way to avoid this step and copy the file manually?<br /><br />Thanks for your help,<br />ct
تم تعديل 14916 منذ 21 سنوات من الدقائق.
Junior Member
المشاركات: 49
تاريخ الإنضمام: 20/3/05
المشاركات الحديثة
yep, just copy your war file in the extension liferay portal .../portlet and in this directory make an >ant deploy. <br /><br />Afterthat, your application will be deployed and just run the server and test if it works<br /><br /><br /><br />While
just run the server and test if it workssounds like a Mac commercial, and I have read and followed the instructions at <a href='http://www.liferay.com/cms/servlet/DOCUMENTATION-DEVELOPMENT-HOT-DEPLOY' target='_blank'>HOT DEPLOY</a> so I have the test.war I downloaded from above and the portletsamples.war also downloaded from a link from above, I modified the build.xml referenced above and did the ant deploy and the build was successful....<br /><br />
test if it worksI looked in the war files and found portlets for bookmark portlet, notepad, jspportlet from the samples.war and test_jsp and test_struts in the test.war, I restarted the server where it deployed to, and I tried to 'personalize pages' and I didn't see any of those newly hot deployed portlets.<br /><br />So I thought about the 'admin' portlet and went there and none of those hot deployed portlets show there either.<br /><br />So
test if it worksshould be followed by
look here and there and if they aren't there try ...<br /><br />BTW I see in my Tomcat webapps where the portletsamples folder and the test folder were created and under portletsamples there is a bookmarkportlet, jspportle, notepad, weather folders. Under the test folder there is the test portlet.<br /><br /><b>What next?</b>
تم تعديل 14916 منذ 21 سنوات من الدقائق.
Junior Member
المشاركات: 49
تاريخ الإنضمام: 20/3/05
المشاركات الحديثة
While sounds like a Mac commercial, and I have read and followed the instructions at <a href='http://www.liferay.com/cms/servlet/DOCUMENTATION-DEVELOPMENT-HOT-DEPLOY' target='_blank'>HOT DEPLOY</a> so I have the test.war I downloaded from above and the portletsamples.war also downloaded from a link from above, I modified the build.xml referenced above and did the ant deploy and the build was successful....<br /><br /> I looked in the war files and found portlets for bookmark portlet, notepad, jspportlet from the samples.war and test_jsp and test_struts in the test.war, I restarted the server where it deployed to, and I tried to 'personalize pages' and I didn't see any of those newly hot deployed portlets.<br /><br />So I thought about the 'admin' portlet and went there and none of those hot deployed portlets show there either.<br /><br />So should be followed by <br /><br />BTW I see in my Tomcat webapps where the portletsamples folder and the test folder were created and under portletsamples there is a bookmarkportlet, jspportle, notepad, weather folders. Under the test folder there is the test portlet.<br /><br /><b>What next?</b><br /><br /><br /><br /><b>More Info, I renamed the Liferay webapp to AlariusPortal because I wanted to have a reference Liferay instance on that same Tomcat.<br /><br />Also, I have a bundled Liferay/Tomcat and when I change the build.xml in /my-portlets and do 'ant deploy' on it, the /Liferay stand alone DOES get modified.<br /><br />Here is my build.xml...</b>
<target name=""deploy"" depends=""init"">
<java classname=""com.liferay.portal.tools.PortletDeployer"" classpathref=""project.classpath"" fork=""true"" newenvironment=""true"">
<!-- Required Arguments -->
<jvmarg value=""-Dportlet.deployer.base.dir=./"" />
<jvmarg value=""-Dportlet.deployer.dest.dir=${app.server.deploy.dir}"" />
<jvmarg value=""-Dportlet.deployer.app.server.type=${app.server.type}"" />
<jvmarg value=""-Dportlet.deployer.taglib.dtd=${app.server.deploy.dir}/ext.ear/portal-web-complete.war/WEB-INF/tld/liferay-portlet.tld"" />
<!-- Optional Arguments -->
<jvmarg value=""-Dportlet.deployer.jboss.prefix=1"" />
<jvmarg value=""-Dportlet.deployer.tomcat.lib.dir=${app.server.dir}/common/lib/ext"" />
<!-- Dependent Libraries -->
<arg value=""${app.server.deploy.dir}/ext.ear/portal-web-complete.war/WEB-INF/lib/util-taglib.jar"" />
<arg value=""${app.server.deploy.dir}/ext.ear/lib/util-java.jar"" />
</java>
</target><br /><br /><b>Q I looked at the modified files when I did the 'ant deploy' targeting the /Liferay and the modified files when I targetted the Tomcat 5 with my renamed deployed Liferay webapp, and I do not see the linkage. What in Liferay detects the new hot deployed war files? </b>
تم تعديل 14916 منذ 21 سنوات من الدقائق.
Junior Member
المشاركات: 49
تاريخ الإنضمام: 20/3/05
المشاركات الحديثة
What in the modified web.xml files in the newly deployed portlet webapps tells Liferay that they are there? Nothing in the Liferay xml gets modified and it works with the bundled /Liferay deployed Tomcat and not with Tomcat/webapps/Liferay?<br /><br />
تم تعديل 17551 منذ 21 سنوات من الدقائق.
New Member
المشاركات: 8
تاريخ الإنضمام: 4/5/05
المشاركات الحديثة
Hi, <br /><br />could I hot-deployed a WAR file has only contains jsp and servlet (don't use struts and ejb). <br />I deploy liferay on Jboss. Follow the instruction on www.liferay.com I must copy WAR file to /portlet and then run ant file. <br /><br />I have another solution : Copy WAR file to $JBOSS_HOME/server/default/deploy <br />for example :<br /><br /> $JBOSS_HOME/server/default/deploy<br /> ext.ear<br /> text.war<br />After deploy 2 web-app text.war will integrate to liferay. <br /><br />
تم تعديل 13086 منذ 21 سنوات من الدقائق.
Liferay Legend
المشاركات: 1254
تاريخ الإنضمام: 18/8/04
المشاركات الحديثة
could I hot-deployed a WAR file has only contains jsp and servlet (don't use struts and ejb).<br />Not really, no, not unless the WAR is a portlet-application and contains portlets. If it is just a standard webapp, you can "hot deploy" it using your standard container's deployment process, and then access the servlet from Liferay portlets. But you cannot "Liferay hot-deploy" a plain servlet application - it needs to be a portlet application containing portlets (of course it can contain servlets too).
Community
Company
Feedback