Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
194 views
in Technique[技术] by (71.8m points)

java - How to deploy portlets to Liferay?

I have faced problems in trying to install new portlets to Liferay running on Glassfish domain. I figured out the flow very lately and want to share it with others also. So, please read the answer and hope this helps someone :)

(Pre requisites for the problem is that I knew that adding projects running on Glassfish is done with a autodeploy folder, but making them visible on Liferay was another story.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

So, you make first a .war file let's say a portlet of name your_file.war. You wanna have it running on a glassfish domain under Liferay portal.

Steps to success:

1) Navigate to Control Panel -> Plugins Installation on Liferay
2) hit Install new portlets
3) hit Configuration
4) Fill in to Deploy Directory a new place for deployment let's say [your domain]/autodeploy2
5) Check that in the next line target is [your domain]/autodeploy (it is the Glassfish default deployment directory)
6) hit save

Now deployment will be done by copy pasting files to that new directory [your domain]/autodeploy2. The rest of it is handled automatically. Setting takes action imediatedly.

Done with deployment: Make a victory jig and enjoy :)

..you stop dancing and face a bug. You want a new revision to be deployed.. In this case, continue reading.

So, you have built your war again and want to re-deploy. Do the following:

1) undeploy old stuff from (your domain)/autodeploy folder by deleting the war file. Don't delete any other file.

2) result is that your_file.war_UnDeployed file will appear.

3) deploy new file by copying the newly built war in (your domain)/autodeploy2 folder.

4) result is that your_file.war_deployed will appear in (your domain)/autodeploy folder.

Make a dance again :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...