As we are aware that LifeRay portal server is used for deploying Portal applications, But LifeRay allows us to deploy a standard web application (written in servlet, jsp e.t.c) into the LifeRay portal server as a Portlet application.
In This article we will see how we can deploy a web application as a Portlet in LifeRay portal server.
1. Create a sample web application.
2. Copy the application into the LifeRay Portal Server
3. Add the Portlet
4. Basic Issues
1. Create a sample web application
Create a sample web application (For this demo purpose I have created a sample web application which will have a link, when clicked shows a message).
2. Copy the application into the LifeRay Portal Server
Copy the Application into the auto Deploy folder for liferay.When we see the directory structure of the Liferay portal server , we see
Data
Deploy (Auto Deploy Folder For LifeRay Portal Server)
Jboss-5.1.0
License
Readme.html
Copy the web application into the Deploy directory.we can see the messages in the console about the deployment like,
13:05:53,426 INFO [AutoDeployDir] Processing SampleApp.war
13:05:53,427 INFO [PortletAutoDeployListener] Deploying package as a web application
13:05:53,428 INFO [PortletAutoDeployListener] Copying portlets for /usr/liferay-portal-6.0.6/deploy/SampleApp.war
Expanding: /usr/liferay-portal-6.0.6/deploy/SampleApp.war into /tmp/20111111130553428
Copying 1 file to /tmp/20111111130553428/WEB-INF/classes
Copying 1 file to /tmp/20111111130553428/WEB-INF/classes
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF/jsp/liferay/wai
Copying 20 files to /usr/liferay-portal-6.0.6/jboss-5.1.0/server/default/deploy/SampleApp.war
Copying 1 file to /usr/liferay-portal-6.0.6/jboss-5.1.0/server/default/deploy/SampleApp.war
Deleting directory /tmp/20111111130553428
13:05:53,566 INFO [PortletAutoDeployListener] Portlets for /usr/liferay-portal-6.0.6/deploy/SampleApp.war copied successfully. Deployment will start in a few seconds.
13:05:58,194 INFO [TomcatDeployment] deploy, ctxPath=/SampleApp
13:05:58,347 INFO [PortletHotDeployListener] Registering portlets for SampleApp
13:05:58,468 INFO [PortletHotDeployListener] 1 portlet for SampleApp is available for use
13:05:53,427 INFO [PortletAutoDeployListener] Deploying package as a web application
13:05:53,428 INFO [PortletAutoDeployListener] Copying portlets for /usr/liferay-portal-6.0.6/deploy/SampleApp.war
Expanding: /usr/liferay-portal-6.0.6/deploy/SampleApp.war into /tmp/20111111130553428
Copying 1 file to /tmp/20111111130553428/WEB-INF/classes
Copying 1 file to /tmp/20111111130553428/WEB-INF/classes
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF
Copying 1 file to /tmp/20111111130553428/WEB-INF/jsp/liferay/wai
Copying 20 files to /usr/liferay-portal-6.0.6/jboss-5.1.0/server/default/deploy/SampleApp.war
Copying 1 file to /usr/liferay-portal-6.0.6/jboss-5.1.0/server/default/deploy/SampleApp.war
Deleting directory /tmp/20111111130553428
13:05:53,566 INFO [PortletAutoDeployListener] Portlets for /usr/liferay-portal-6.0.6/deploy/SampleApp.war copied successfully. Deployment will start in a few seconds.
13:05:58,194 INFO [TomcatDeployment] deploy, ctxPath=/SampleApp
13:05:58,347 INFO [PortletHotDeployListener] Registering portlets for SampleApp
13:05:58,468 INFO [PortletHotDeployListener] 1 portlet for SampleApp is available for use
Once the Deployment is done,we need to wait for a few minutes until the portlet is auto deployed.
3. Add the Portlet
Create a Page like ,
Select Page from Add Toolbar, Enter the Page Name. The new page will be added.
Click that new Page.
Once the page is created now add the web application as a portlet.Select the web application from the “Undefined” category and click “add”.
The application will be added under the new page we created.
More Articles To Come , Happy Coding.......
No comments :
Post a Comment