+

Search Tips   |   Advanced Search

Deploy Java Platform, Enterprise Edition resources

We can manually predeploy portlet application WAR files using the Dmgr and later register them into HCL WebSphere Portal, together with other Java Platform, Enterprise Edition resources and artifacts. Portlet applications are usually packaged into single WAR files. These WAR files can be directly deployed into the portal by using portal administration means. For example, the Manage Web Modules portlet or the XML configuration interface. The portal administration functions manage the correct deployment and configuration into both WebSphere Application Server and HCL WebSphere Portal. You might want to deploy portlet applications together with EJBs, or bundle several WAR files into the same EAR file, or work with similar scenarios. For this type of requirement HCL WebSphere Portal provides the predeployed mode with the XML configuration interface. It allows us to configure portlet applications into the portal that you predeployed into the application server as part of a larger EAR file.

You deploy the EAR file into the application server by using the application server administration interfaces, such as the Dmgr or the wsadmin command-line tool. When we deploy the EAR file into the application server, we can use the portal XML configuration interface to run the portal specific configuration steps that are required to configure the available portlet applications.

  1. Bundle the portlet applications that we want to register together with other JEE resources as an Enterprise Application Archive (EAR file).

  2. Deploy this EAR file into WebSphere Application Server using the wsadmin command-line tool or the Dmgr. Take a note of the target directory to which we deploy the EAR file; this step is needed for creating the XML file in the next step. Also, make sure that the web modules in the EAR file are deployed with the same server and virtual host mappings as the portal.

  3. Create a portal XML script file that deploys and configures the portlet applications that are deployed with the EAR file. For a sample XML file for deploying and configuring a predeployed portlet, refer to RegisterPreDeployedEAR.xml in the Sample XML configuration files topic.

  4. Run the XML script using the portal XML configuration interface.

After completing these steps, the portlet is ready for use.

Note:

  1. We can register predeployed applications into the portal only using the XML configuration interface. When you register a predeployed application, the Manage Web Modules portlet shows this application.

  2. We can later use the portal administration portlets to remove the portlet definitions from the portal database. However, this process does not remove the EAR file from WebSphere Application Server.

  3. We can update a predeployed portlet application only by using the XML configuration interface.

  4. We cannot update a deployed portlet application WAR file with a predeployed EAR file and vice versa. To change between the two types of files, we must delete the existing portlet application and deploy the new one. However, deleting the existing portlet application also deletes all configuration data of that application. A predeployed application can be updated only by updating the EAR file in WebSphere Application Server and subsequent update of the contained WAR file in portal using the XML configuration interface. Cross updates of a predeployed EAR file with a real WAR and vice versa are not possible.

  5. The WebSphere Application Server administrator must take care of correctly configuring the dispatch mechanisms for these applications.

For more information about the XML configuration interface and how to use it, refer to XML configuration interface. The sample XML file RegisterPreDeployedEAR.xml shows you an example for deploying and configuring a predeployed portlet.

The following table shows the differences between WAR and EAR deployment:

Parent topic: Manage portlets, portlet applications, and iWidgets

References: