Different methods to deploy a portlet using RAD IDE and WebSphere Portal Server

0 comments



If you are using RAD IDE for portlet development and WebSphere Portal as the deployment server then as a developer you need to know different methods to deploy a portlet on to the server. This will serve multiple purposes.
  • First, if one deployment options fails for some reason then you can try the other one.
  • Second, it will also help you when you move from DEV environment to upper environments.
Below are some of the popular methods to deploy a portlet.

1. Using Portal Admin Console

This is the option that most of the newbies prefer over other deployment options.
  • Export your portlet application as .war file using RAD.
  • Open the Portal admin console using the URL http://localhost:10039/wps/portal. The port number (10039) may vary from machine to machine.
Now, navigate to following section
Administration -> Portlet management -> Web Modules
Click on "Install" and select the .war file from your local drive and click next. This will install the portlet application and makes it available to portal. Now you need to add the portlet to the required portal page. Although this option is very straight forward and simple but after looking at other options you may feel that this is not the best one.

2. Using the Traditional way (using WAS admin console)

The most easiest way of deploying any application (either portlet or simple web application) is through WAS admin console.

Log on to WAS administration console using the URL https://localhost:9080/ibm/console.

Now, navigate to following section
Application -> New Application -> New Enterprise Application
  • Select an EAR or WAR file from your file system.
  • Choose the "Fast path" option and click next.
  • Leave everything as is in "Select installation options" and click next.
  • Select the deploy server for portal, the one which is ending with websphere_portal.
  • Select the module you want to deploy and click apply.
  • Enter the context root (/) for the selected application and click next.
  • Verify the generated summary information and click finish.
It will display the "Deploy Successful" message. Click "save" to save the configuration.

At this point of time, the portlet application is still not available to the server. Next step is to make the portlets available to the portal server. For that , modify the DeployPortlet.xml located at

\IBM\WebSphere\PortalServer\doc\xml-samples 

to the portlet you need and then run it through "Portal Admin UI".

Administration -> Portal Settings -> import xml

This will install the portlet successfully and make available to portal page. You can use the same way for installing theme as .WAR file and then run the DeployTheme.xml.

3. Using RAD, Deploy Portlet Option

The most easy and simplest way of deploying a portlet is by using "Deploy Portlet" option in  RAD.  When you right click on the portlet application, you will see an option "Deploy Portlet". By selecting this option, RAD will automatically generate a xml script for portlet and deploys it on the server configured in the RAD. This way you can avoid the overhead of creating a .WAR file every time you make a change in your portlet application.

4. Using RAD, Run As Option

The last option, not the cleanest way to do deployment is through "Run As" option in RAD.

By right clicking the project select Run As -> Run on server will install the portlet on the portal home under "Rational Components" page. This way it will create multiple sub pages under this page for each portlet you deploy.

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club