bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Development Guide

Deploying Portals

This section outlines the steps required to deploy portal applications in the development environment.

This chapter includes information on the following topics:

- Hot Deploying With the Portal Wizard

- Deploying Without the Portal Wizard

- Deploying a Portal without Hot Deploy

- Best Practice Guidelines for Deploying Your Portal

For more information, see the deployment guides at http://e-docs.bea.com//wls/docs70/deployment.html. For instructions on deploying to production environments, including clusters and managed servers, consult Using the Domain Configuration Wizard.at http://edocs.bea.com/platform/docs70/confgwiz/index.html.

Hot Deploying With the Portal Wizard

When you use the Portal Wizard to create a portal, you have an opportunity at the end of the wizard to hot deploy the portal Web application immediately. This is the simplest way to deploy.

Once you have deployed the portal, you can create additional portlets for it without deploying again. You only need to synchronize the E-Business Control Center to add the new portlets to the deployed portal.

Figure 4-1

Hot Deploy Option in the Next Steps Window of the Portal Wizard

Deploying

Without the Portal Wizard

Deploying without the Portal Wizard requires some manual steps.

Note:

It can be very helpful to create a dummy portal and hot deploy it, as a model of what you need to do when you deploy manually. To create and deploy a dummy domain, portal, portal Web application, and associated J2EE resources, see Creating a New Portal in a New Domain.

To deploy manually, use the WebLogic Server deployment guides at http://e-docs.bea.com/wls/docs70/deployment.html, in particular "WebLogic Server Deployment" at http://e-docs.bea.com/wls/docs70/programming/deploying.html.

As you follow those deployment instructions and use the dummy portal as a reference, ensure that you accomplish the following:

- Place the J2EE resources for the portal on the server

- Use the E-Business Control Center to edit metadata (so the server knows where to look for your J2EE resources)

- Add the portal Web application to the WebLogic server using the console

- Start the WebLogic Portal server from your user domain

- Use the E-Business Control Center to synchronize the metadata to the WebLogic Server

Deploying a Portal without Hot Deploy

If you create a new portal and a new portal Web application using the E-Business Control Center, but for some reason choose not to hot deploy it to the server, the J2EE resources for that application will not be automatically deployed. This presents two scenarios for deploying the new portal Web application:

- If the E-Business Control Center project file is on a machine separate from the target server, the J2EE resources will have to be moved to the server before they can be deployed using the WebLogic console. If this is the case, perform steps 1 - 3 in this section.

- If you are running the E-Business Control Center on the target server, the J2EE files will already be in place, so the only thing you need to do is deploy the application components in the WebLogic console. If this is the case, skip the first step in this section.

Manually Deploying a Portal Web Application

Deploying a portal that was not deployed using the hot sync function of the Portal Wizard requires the following steps:

Step 1: Move J2EE Resources

If the E-Business Control Center is running on a server remote from the target server, J2EE resources need to be moved. A remote server must have a complete enterprise portal application, as shown in Figure 4-2.

Figure 4-2 An Enterprise Portal domain without a Portal

To move J2EE resource from the local server to the remote server, take the following steps:

1. Copy the NewPWApp directory from the local server, shown in Figure 4-3, into the Portal Enterprise application directory shown in Figure 4-2.

   Figure 4-3 Copying the Portal Web Application

2. Copy the NewPWApp directory from the application-sync directory on the local server, shown in Figure 4-4, into the application-sync\webapps directory on the remote server, shown in Figure 4-5.

   Figure 4-4 Local Metadata directory

   Figure 4-5 Remote Metadata destination

3. Proceed with the rest of the steps in this procedure.

Note: In order for a Portal Web application to include all the services available to the WebLogic platform, the following elements must be in place:

- The taglib JARs, shown in Listing 4-1 and Listing 4-2, must appear in the following directory:

beaApps\portalApp\<yourPortalWebApp>\WEB-INF\lib

- The enterprise application JARs, shown in Listing 4-3, must appear in the following directory:

beaApps\portalApp\<yourPortalWebApp>\

Listing 4-1 Taglib JARs Required to Support baseportal instance

>     weblogic700\common\templates\webapps\portal\baseportal\j2ee\WEB-INF\lib:

>     util_taglib.jar

>     webflow_servlet.jar

>     ent_taglib.jar

>     i18n_taglib.jar

>     webflow_taglib.jar

>     um_taglib.jar

>     lic_taglib.jar

>     es_taglib.jar

>     ren_taglib.jar

>     portlet_taglib.jar

>     res_taglib.jar

>     p13n_servlet.jar

>     weblogic-tags.jar

>     portal_taglib.jar

>     portal_servlet.jar

>     visitor_taglib.jar

>     pz_taglib.jar

>     ph_taglib.jar

>     ps_taglib.jar

>     cm_taglib.jar

Listing 4-2 Taglib JARs Required to Support All Portal Services

>     /weblogic700/portal/lib/commerce/web/cat_taglib.jar

>     /weblogic700/portal/lib/commerce/web/eb_taglib.jar

>     /weblogic700/portal/lib/commerce/web/productTracking_taglib.jar

>     /weblogic700/portal/lib/p13n/web/ad_taglib.jar

>     /weblogic700/portal/lib/p13n/web/cm_taglib.jar

>     /weblogic700/portal/lib/p13n/web/ph_taglib.jar

>     /weblogic700/portal/lib/p13n/web/ps_taglib.jar

>     /weblogic700/portal/lib/p13n/web/pz_taglib.jar

>     /weblogic700/portal/lib/p13n/web/tracking_taglib.jar

Listing 4-3 Enterprise JARs Required by Portal

>     campaign.jar

>     catalogws.jar

>     commerce_campaign_bridge_util.jar

>     commerce_util.jar

>     customer.jar

>     document.jar

>     ebusiness.jar

>     ejbadvisor.jar

>     events.jar

>     ldapprofile.jar

>     mail.jar

>     p13n_util.jar

>     payment.jar

>     pipeline.jar

>     placeholder.jar

>     portal.jar

>     portal_util.jar

>     property.jar

>     rules.jar

>     tax.jar

>     usermgmt.jar

Step 2: Synchronize Metadata

Open the project for your application in the E-Business Control Center and perform the synchronization step. For detailed instructions on this step, consult the chapter called "Synchronizing the New Portal Data to your Application.

Note: If you are deploying the new portal Web application to a remove server, remember to set up a new session in the E-Business Control Center, and designate the application name as portalApp, the enterprise application, instead of NewPWApp, the Web application name.

Step 3: Deploy in the WebLogic Server Console

The process of deploying a new Portal Web application consist of three steps:

- Create a new Web Module

- Configure the Web New Application

- Verify Deployment

Create a new Web Module

1. Navigate to the WebLogic Server Console:

   http://<yourserver>:<port>/console/

2. In the left pane, click on myNewDomain > Deployments > Applications —> portalApp

3. In the right pane, click on Edit Application Descriptor, as shown in Figure 4-6

   Figure 4-6 Edit Application Descriptor

4. When the new browser window appears, right-click on Web Modules in the left pane, as shown in Figure 4-7.

   Figure 4-7 Right-click on Web Modules

5. When the Create a New Web Module screen appears, enter the URI (the native file system path is relative to the Enterprise directory, such as beaApps\portalApp), and the Context Root (the URL for the new portal Web application).

6. Click Create, then Apply, at the right corner of this screen, as shown in Figure 4-8.

   Figure 4-8 Enter Module URI and Context Root

7. At the top of the left pane, click on BEA Portal Application, as shown in Figure 4-9.

   Figure 4-9 Select the BEA Portal Application

8. Click Persist in the right pane of the same window, as shown in Figure 4-10.

   Figure 4-10 Click Persist

9. The message "Persistence was successful!" should appear in the right pane. Close the browser window.

Configure the Web New Application

1. Refresh the main console window, then navigate to yourdomain > Deployments > Web Applications and click on Configure a new Web Application in the right panel.

2. When the first Locate Application or Component to configure page appears, click on SELECT to the left of the beaApps application.

3. When the Configure Application or Component page appears, select the server from the list on the right, as shown in Figure 4-11.

Note: Even if you are configuring an application on a remote server, Step 3 in Figure 4-11 will list the server using a drive letter local to the server itself, and not to the machine your web browser is running on. If this example showed a browser connected to a remote host, the fully resolved URL of that host, (instead of localhost:7501,) as shown in Figure 4-11, would appear in the black border next to the words "Connected to".

Figure 4-11 Select Server

1. Move your server to the list of Target Servers on the right by clicking the top arrow between the lists, as shown in Step 3 of Figure 4-12.

   Figure 4-12 Moving Server to Target Servers List

2. Confirm or edit the application name, shown in Step 4 of Figure 4-12.

3. Click on Configure and Deploy, as shown in Step 5 of Figure 4-13.

   Figure 4-13 Configure and Deploy Application

4. When the myNewDomain> Applications> portalApp page appears.

5. After the deployment process runs, a status message appears at the bottom of the window, indicating the deployment was successful, as shown in Figure 4-14.

   Figure 4-14 Successful Deployment Message

6. When the Deployment Status by Target page appears, verify that the status of True appears in the Deployed column for the new application. If it is False, click on Deploy and wait for the process to complete successfully.

Verify Deployment

Finally, verify the portal has been successfully deployed by navigating to http:\\<hostname>:<port>\NewPWApp, as shown in Figure 4-15.

Note: In this example, no portlets have been made visible using the WebLogic Portal Administration Tools, therefore the portal displays none in Figure 4-15.

Figure 4-15 Viewing the Deployed Portal Web Application

Best Practice Guidelines for Deploying Your Portal

We recommend that you use a multiple environment model for developing, testing, and publishing your portal application. BEA Weblogic Platform provides a number of tools and scripts for simple deployment. These tools and best practices are discussed in detail in "WebLogic Server Deployment" at http://edocs.bea.com/wls/docs70/programming/deploying.html.

We recommend deploying your portal in the following three-stage model:

Stage 1: Deploy to a Server on Your Own Machine

Use this deployment stage for development and unit testing. We strongly recommended that you keep all development limited to this stage and only deploy to the next stage when you are finished unit testing.

Note: If you do decide to do development and unit testing in a shared environment, each developer should work within their domain to avoid overwriting database information for other developers.

Stage 2: Deploy From a Local Computer to a Staging Server

Once development and unit testing is completed, deploy to a staging server for exception testing. Any faulty code found should be resolved on a local machine and then redeployed back to a staging server.

Cluster testing, if applicable, should be performed on a staging server.

Stage 3: Deploy From the Testing Environment to a Live Production Server

Once all development and exception testing is completed, you may deploy the application to a live production server. You may also want to retest your cluster deployment at this point.

Any additional development for the application should be developed and unit tested as described in Stage 1, tested as described in Stage 2, then redeployed to the production server.