Skip Headers
Oracle® Fusion Middleware Portal Development Guide for Oracle WebLogic Portal
10g Release 3 (10.3.2)

Part Number E14243-02
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Setting up Your Portal Development Environment

Use this chapter as you prepare your Oracle Enterprise Pack for Eclipse environment for portal development. This chapter describes the Portal EAR Project Wizard, Portal Web Project Wizard, Datasync Project Wizard, the Add/Remove a Project dialog, and a subset of the WebLogic Domain Configuration Wizard. This chapter also describes some features in the Oracle Enterprise Pack for Eclipse interface that you might find useful as you use it to develop portals.

For a step by step example of how to perform the tasks related to each wizard, see Oracle Fusion Middleware Tutorials for Oracle WebLogic Portal.

Tip:

You can find detailed information about how these setup tasks are related to the deployment of your project in the Oracle Fusion Middleware Production Operations Guide for Oracle WebLogic Portal.

This chapter contains the following sections:

4.1 Roadmap for Environment Setup Tasks

The required environment setup options vary depending on whether you want to develop a "conventional portal" or a collaboration portal. This section describes the basic tasks that you should perform in each case:

4.2 Portal Perspective

The instructions and figures in this guide are based on the views that are available in the Portal perspective.

  1. If the Portal perspective is not already open, select it by choosing Window > Open Perspective > Portal.

4.3 WebLogic Domain Configuration Wizard

This section describes the sections of the Configuration Wizard that are interesting from a WebLogic Portal perspective.

A domain is a group of WebLogic Server resources that contain the application server. You must have a server domain that is WebLogic Portal enabled in order to test the portal that you create. This customized domain is generally called a portal domain.

Note:

A sample portal domain comes with WebLogic Portal and is located at <WLPORTAL_HOME>/samples/domains/portal. To use this domain, you must install the Portal Examples feature. See "Installing the Portal Examples" in Oracle Fusion Middleware Release Notes for Oracle WebLogic Portal for details.

You can start the Domain Configuration Wizard in several ways. Here are summaries of two methods:

The first dialog in the wizard looks like the example in Figure 4-1.

Figure 4-1 Oracle WebLogic Server Configuration Wizard

Description of Figure 4-1 follows
Description of "Figure 4-1 Oracle WebLogic Server Configuration Wizard"

Table 4-1 shows the values that you would typically enter in the wizard, along with some useful notes that you might find useful as you set up your portal domain.

Note:

For more information on the Domain Configuration Wizard, see Oracle Fusion Middleware Creating Domains Using the Configuration Wizard.

Table 4-1 Configuration Wizard Values for a Portal Domain

In this Wizard Page... Select or Enter...

Welcome

Create a new WebLogic domain (the default)

Select Domain Source

In the Generate a domain configured automatically to support the following products list, select WebLogic Portal.

Notice that a WebLogic Portal Collaboration Repository checkbox is available on this wizard dialog; portal projects that use Collaboration Portlets features must have a domain that includes this repository. For information about Collaboration Portlets, see the Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.

For more information on the options available here, refer to Section 4.1, "Roadmap for Environment Setup Tasks."

Configure Administrator Username and Password

(Default) user name: weblogic

User password:

Confirm user password:

Note: The password must contain at least one non-alphabetical character.

You might want to use this WebLogic Server administrator login when using the WebLogic Portal Administration Console, so keep track of what you enter here.

Configure Server Start Mode and JDK

Development Mode (the default) or Production Mode

For information on the implications of using either of these options, refer to the Oracle Fusion Middleware Production Operations Guide for Oracle WebLogic Portal.

JRockit SDK (recommended)

Configure JDBC Data Sources

Use the defaults.

Note: When you click Next, the Configuration Wizard attempts to run a series of connection tests against the database. If the database is not running at this point, these tests will always fail. After the tests run, just click Next again. A warning dialog appears asking if you want to bypass testing. You can safely ignore this warning. Click OK to continue.

Run Database Scripts

Click Run Scripts, then click Next.

Note: This step is new as of WebLogic Portal 10.3.2. For past releases, these scripts were run automatically for the default PointBase database. You must click the Run Scripts button before continuing.

Select Optional Configuration

Select an option to configure. The wizard will take you through the appropriate steps.

Configuration Summary

Click Create to create the domain.

Note: For more information on the Domain Configuration Wizard, see Oracle Fusion Middleware Creating Domains Using the Configuration Wizard.


4.4 Portal EAR Project Wizard

This section describes the dialogs of the WebLogic Portal Enterprise Application Archive (EAR) Project Wizard.

An EAR project collects the component projects of the application for deployment; you create one EAR project per enterprise application. The EAR project contains JAR files, deployment descriptors, build files, and auto-generated files. For more information about EAR projects and their relationship to the other projects in Oracle Enterprise Pack for Eclipse, refer to the "Web Applications" topic in the Oracle Workshop for WebLogic User's Guide.

The Portal EAR Project is an EAR project that is customized for WebLogic Portal. EAR projects appear as siblings to the other projects in a workspace but functionally, they link together projects and do not contain any of the content of your web application.

To start the Portal EAR Project Wizard, perform these steps:

  1. From the File menu, select New > Portal EAR Project. The New Portal EAR Project dialog displays, as shown in Figure 4-2.

    Figure 4-2 New Portal EAR Project Dialog

    Description of Figure 4-2 follows
    Description of "Figure 4-2 New Portal EAR Project Dialog"

  2. (Optional) In the Configuration section, click Modify to add or remove EAR Project Facets. The Project Facets dialog is described in Section 4.4.1, "Select Project Facets Dialog."

4.4.1 Select Project Facets Dialog

Figure 4-3 shows an example of the New Portal Ear Project – Project Facets dialog.

Figure 4-3 Project Facets Dialog

Description of Figure 4-3 follows
Description of "Figure 4-3 Project Facets Dialog"

Table 4-2 describes each WebLogic Portal–related field of the Project Facets dialog. The selections that you make here cause WebLogic Portal to create files that you can use as you create your project, and associate the project with the correct set of shared J2EE libraries. For more information about shared J2EE libraries, see Section 3.5, "WebLogic Portal and Shared J2EE Libraries."

Table 4-2 Project Facets Dialog Data Fields

Field Description

Configurations dropdown menu

The value automatically displayed in this dropdown menu corresponds to the selections made in the tree view of project facets. You can select a preset group of facets from the dropdown menu, or select and unselect specific check boxes in the tree display. If you select a customized set of facets, <custom> displays in the field.

Project Facet Display Tree: WebLogic Portal primary

Select the WebLogic Portal facets that you want to install. If certain facets depend on others, messages appear to describe these dependencies and your selections must conform to these requirements.

Project Facet Display Tree: WebLogic Portal (Optional)

Check this box to add additional services to your project. For details on WebCenter Analytics Integration, see the Oracle Fusion Middleware Oracle WebCenter Analytics Administrator's Guide for Oracle WebLogic Portal.

Project Facet Display Tree: WebLogic Portal Collaboration

Check this box (and one or more of its sub-features) to enable this project as a collaboration-enabled EAR.


4.5 Add and Remove Projects Dialog

This section describes the Add and Remove Projects dialog, which you use to associate an EAR project with a portal domain. If your EAR Project already exists when you create you domain, you can make this association when you create the server domain. If not, you can do it later using the steps outlined in this section.

To associate the Portal EAR Project with the server, perform these steps:

  1. In the Servers view, right-click Oracle WebLogic Server v10.3, then select Add and Remove Projects.

    The Add and Remove Projects dialog displays, as shown in Figure 4-4.

Figure 4-4 Add and Remove Projects Dialog

Description of Figure 4-4 follows
Description of "Figure 4-4 Add and Remove Projects Dialog"

  1. Click to select the desired EAR project in the Available projects column and then click Add.

    The project is added to the Configured projects column on the right.

  2. Click Finish.

    The Portal EAR Project is now associated with the server. To verify this, in the Servers view you can expand the server node to view the server's associated projects. The myPortalEAR project should be shown as a subordinate node.

4.6 Portal Web Project Wizard

You use the Portal Web Project Wizard to create the web project that contains portal files. When you create a Portal Web Project, WebLogic Portal creates a set of shared J2EE libraries and files that you can use as you create your portal.

To start the wizard, perform these steps:

  1. Select File > New > Portal Web Project.

    The New Portal Web Project dialog displays.

4.6.1 New Portal Web Project – Portal Web Project

Figure 4-5 shows an example of the New Portal Web Project dialog.

Figure 4-5 New Portal Web Project Dialog

Description of Figure 4-5 follows
Description of "Figure 4-5 New Portal Web Project Dialog"

Table 4-3 describes each field of the New Portal Web Project – Portal Web Project dialog.

Table 4-3 New Portal Web Project Dialog Data Fields

Field Description

Project name

The name of the portal web project.

Contents area –

Use default check box and file browser

You can use the content area that WebLogic Portal creates by default, or point to another directory where your project contents are stored.

Target Runtime

The runtime (server) to which you will deploy.

Dynamic Web Module version

Select the Eclipse Dynamic Web Module version. Adds support for the Java Servlet API, for generation of dynamic Web page content. The default is recommended.

Configurations

Included facets. Click Modify to bring up the Project Facets dialog. See Section 4.6.2, "New Portal Web Project – Select Project Facets dialog."

Add project to an EAR check box and file browser

If you have not yet created a Portal EAR Project, leave this check box unselected; you can associate the project with an EAR later by right-clicking the web project in the Package Explorer tree and selecting Properties; then use the J2EE Module Dependencies setting to associate the project with the EAR. See also Section 4.8, "Associating Web and Datasync Projects with EAR Projects."

If you have an existing EAR to associate with the project, select the check box; the dropdown menu displays an auto-filled EAR name corresponding to the EAR project(s) that you created in the Portal EAR Project Wizard. Click to select the appropriate EAR file, or click Browse to navigate to an existing EAR file.

A portal web project must be associated with an EAR for the build to work successfully.


4.6.2 New Portal Web Project – Select Project Facets dialog

The New Portal Web Project – Project Facets dialog is shown in Figure 4-6.

Figure 4-6 New Portal Web Project – Project Facets Dialog

Description of Figure 4-6 follows
Description of "Figure 4-6 New Portal Web Project – Project Facets Dialog"

Table 4-4 describes each WebLogic Portal–specific field of the dialog.

Table 4-4 New Portal Web Project Dialog Data Fields - WebLogic Portal Information

Field Description

Configurations dropdown menu

The value automatically displayed in this dropdown menu corresponds to the selections made in the tree view of project facets. You can select a preset group of facets from the dropdown menu, or select and unselect specific check boxes in the tree display. If you select a customized set of facets, <custom> displays in the field.

Project Facet Display Tree: WebLogic Portal primary

Select the WebLogic Portal facets that you want to install. If certain facets depend on others, messages appear to describe these dependencies and your selections must conform to these requirements. For the list of selections, expand the WebLogic Portal node in the tree.

Project Facet Display Tree: WebLogic Portal (Optional)

Check this box to choose from optional facets. Optional facets include analytics integration and content presenter framework. For the list of selections, expand the WebLogic Portal (Optional) node in the tree.

Project Facet Display Tree: WebLogic Portal Collaboration

Check this box to add the collaboration portlets to the project. For detailed information on the Collaboration Portlets, see the Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.

Collaboration Portlets - causes the J2EE library wlp-collab-portlets-app-lib to be associated with your project.

Details

The tab displays information about the web project, such as details about the Dynamic Web Module version.

Runtimes

The tab displays the runtimes (web servers) associated with this web project.


4.6.3 New Portal Web Project - Web Module Dialog

The New Portal Web Project – Web Module dialog is shown in Figure 4-7.

Figure 4-7 New Portal Web Project – Web Module Dialog

Description of Figure 4-7 follows
Description of "Figure 4-7 New Portal Web Project – Web Module Dialog"

Table 4-5 describes each field of the dialog.

Table 4-5 New Portal Web Project – Web Module Data Fields

Field Description

Context Root

The context root of the web application.

Content Directory

The default web content directory name WebContent is automatically displayed; you can change it if you wish.

As a best practice, you should locate your portal file(s) and other portal resources in a web content directory that is subordinate to the web project directory.

Java Source Directory

The default Java source directory name src is automatically displayed; you can change it if you wish.


4.6.4 New Portal Web Project - JSF Capabilities Dialog

The JSF facet is selected by default when you create a web project. This dialog lets you configure the JSF features in your project. If you deselected the JSF facet for any reason, this dialog will not appear. The dialog is shown in

Figure 4-8 New Web Project - JSF Capabilities Dialog

Description of Figure 4-8 follows
Description of "Figure 4-8 New Web Project - JSF Capabilities Dialog"

Table 4-6 describes the fields of the JSF Capabilities dialog.

Table 4-6 New Portal Web Project - JSF Capabilities Dialog Fields

Field Description

JSF Implementation Libraries

This section lets you select the JSF implementation that you want to use. You can choose the default (the version supplied by the server) or click New to define a new JSF library consisting of the JSF jar files that you choose.

JSF Component Library

This section lets you specify the contents of the JSF component library. For information on component and implementation libraries, refer to the Eclipse documentation.

JSF Configuration File, JSF Servlet Name, JSF Servlet Classname, and URL Mapping Patterns

These fields let you modify standard JSF configurations. For information on these fields, refer to the JSF documentation of your choice.


4.6.5 New Portal Web Project - WebLogic Integrated Commons Logging Dialog

The New Portal Web Project – WebLogic Integrated Commons Logging dialog is shown in Figure 4-9. This dialog lets you add a library to the project that sends entries made through Apache Commons Logging to the WebLogic Server Log. For more information on Apache Commons Logging, refer to the Eclipse documentation. Click the Manage WebLogic Shared Libraries to replace or modify the logging default logging library if you want.

Figure 4-9 New Portal Web Project – WebLogic Integrated Commons Logging Dialog

Description of Figure 4-9 follows
Description of "Figure 4-9 New Portal Web Project – WebLogic Integrated Commons Logging Dialog"

4.7 Portal Datasync Project Wizard

A datasync project is an optional project that stores general purpose portal services data that is used in the development of personalized applications and portals. These portal services include User Profiles, Session Properties, Campaigns and others. You can share a single datasync project among several EAR projects if you wish.

To create the datasync project, perform these steps:

  1. Select File > New > Datasync Project. The Create New Datasync Project dialog displays as shown in Figure 4-10.

Figure 4-10 Create New Datasync Project Dialog

Description of Figure 4-10 follows
Description of "Figure 4-10 Create New Datasync Project Dialog"

Table 4-7 describes each field of the dialog. When you click Next, the EAR Projects dialog displays.

Table 4-7 New Datasync Project Data Fields

Field Description

Project name

The name that you want to assign to this datasync web project.

Location

The default web content directory name WebContent is automatically displayed; you can change it if you wish.

You must locate your portal file(s) and other portal resources in a web content directory that is subordinate to the web project directory.

Datasync source folder

The local default Java source directory name src is automatically displayed; you can change it if you wish.

Create default project directories

If checked, a default datasync folder structure is created automatically (for an example, see Figure 4-12). If unchecked, no directory structure is created.

Note: Some datasync components must be placed in a specific folder structure, although most do not. For instance, User Segment and Content Selector components must be placed in specific subfolders of the datasync folder (/segments/GlobalClassifications and /contentselectors/GlobalContentSelectors respectively). You can ask the IDE to warn you if you try to put a datasync file in an improper directory. To enable this warning, select Window > Preferences > WebLogic Portal > Dataysnc. In the Properties dialog, select Show warning on opening files in wrong folder. The warning message also tells you the required folder name.

Default: checked.

Create default project files

If checked, the wizard creates default project files for events, requests, and user profiles.

Default: checked.

Add Project to an EAR

Check this box and pick an EAR from the drop-down menu. The drop-down lists all EARs in the current works space. The datasync project will be associated with the selected EAR. When the selected EAR is deployed, the datasync project is deployed with it.

If you create a datasync project without associating it with an EAR, you can do this step later by right-clicking the datasync project in the Package Explorer tree and selecting Properties; then expand the Datasync node in the tree and select EAR Projects to associate the project with the EAR. See also Section 4.8, "Associating Web and Datasync Projects with EAR Projects."


4.7.1 Create New Datasync Project – EAR Projects

The Create New Datasync Project – EAR Projects dialog is shown in Figure 4-11.

Figure 4-11 Create New Datasync Project – EAR Projects Dialog

Description of Figure 4-11 follows
Description of "Figure 4-11 Create New Datasync Project – EAR Projects Dialog"

This dialog allows you to select the check box for the appropriate Portal EAR project.

Tip:

If you create a datasync project without associating it with an EAR, you can do this step later by right-clicking the datasync project in the Package Explorer tree and selecting Properties; then expand the Datasync node in the tree and select EAR Projects to associate the project with the EAR. See also Section 4.8, "Associating Web and Datasync Projects with EAR Projects."

If you add a Datasync Project with the default settings, it will look similar to the Package Explorer tree shown in Figure 4-12.

Figure 4-12 Datasync Project Added to the Package Explorer

Description of Figure 4-12 follows
Description of "Figure 4-12 Datasync Project Added to the Package Explorer"

4.8 Associating Web and Datasync Projects with EAR Projects

Both web projects (WAR files) and datasync projects must be associated with an EAR project. When you create a web project or a datasync project using the wizard, you are given the chance to associate the project with an EAR. If you have a web or datasync project that is not associated with an EAR or if you want to change the association, you can perform the association at any time by following the steps in this section.

4.8.1 Associating an Web Project with an EAR Project

You can associate a web project (WAR file) with an EAR by right-clicking the web project in the Package Explorer tree and selecting Properties; then use the J2EE Module Dependencies setting to associate the project with the EAR.

Note:

The correct procedure is to use the J2EE Module Dependencies setting to perform this association. You may notice that the Project References dialog appears to let you associate web projects with EAR and datasync projects; however, this dialog is an Eclipse feature that is not used by WLP.

4.8.2 Associating an Datasync Project with an EAR Project

You can associate a datasync project with an EAR project by right-clicking the datasync project in the Package Explorer tree and selecting Properties; then expand the Datasync node in the tree and select EAR Projects to associate the project with the EAR.

Note:

The correct procedure is to use the Datasync > EAR Projects setting to perform this association. You may notice that the Project References dialog appears to let you associate datasync projects with EAR and web projects; however, this dialog is an Eclipse feature that is not used by WLP.

4.9 Using the Merged Projects View

The WebLogic Portal Merged Projects View is included by default in the Portal Perspective. This view shows a combined list of the files in your project, including the associated shared J2EE libraries. This view provides important reference information for your portal development project.

This section includes these topics:

4.9.1 Opening the Merged Projects View

If you are not using the Portal Perspective, you should open the Merged Projects view in the workbench. To do so, select Window > Show View > Merged Projects.

4.9.2 Working with the Merged Projects View

This section explains some of the benefits of the Merged Projects view.

You will see in the Merged Projects view that some items are italicized. The italicized items represent entities that are stored in J2EE shared libraries. All entities that are stored on your file system, such as the portal file you created, are shown in regular type.

You can copy certain files from the J2EE shared library in which they are stored to your file system. To do this, right-click the file in the Merged Projects view and select Copy to Project. This feature copies the file from the shared library to the appropriate place in your project folder. Another function, Copy to Workspace lets you choose where to copy the file.

Not all files can be copied using this feature. For instance, .jar and .class files cannot be copied. Typically, property files, XML files, and similar editable files can be copied. In addition, it is possible to create a J2EE Shared Library that specifically excludes some files from being copied. For more information on J2EE Shared Libraries, see the Oracle Fusion Middleware Production Operations Guide for Oracle WebLogic Portal.

Caution:

If you use the Merged Projects view to copy a J2EE library resource into your project, keep in mind that with future updates to the WebLogic Portal product, you might have to perform manual steps in order to incorporate product changes that affect those projects.

You can view the J2EE library information for a file displayed in the Merged Projects view, including the shared J2EE library name and version. To do this, right-click the file and select Properties.

4.10 Running a Project on the Server

You can use either of two options for running and viewing the results of your project development; the selection you make depends on the changes you have made in your project and whether or not your server is already started.

The following list describes each option available from the context menu in the Project Explorer view:

4.11 Stopping the Server

To stop a running WLP server, do one of the following:

Occasionally during development, you might need to stop the WLP server manually (for example, by pressing Control-C in the server's command window). If this happens, a number of WLP server processes may continue to run and need to be stopped manually. This list of processes includes:

4.12 Customizing a Perspective

Optionally, you can create a personally customized combination of views, so that you can easily return to it any time.

To save the current workbench layout as a perspective, select Window > Save Perspective As, enter a name for your customized perspective in the Name field, and click OK. Your new perspective is added to the list, in the Other category.

You can also set this perspective as the default perspective for Oracle Enterprise Pack for Eclipse, using the Window > Preferences options. For more information, refer to your Eclipse documentation.

4.13 Setting WebLogic Portal Preferences in Oracle Enterprise Pack for Eclipse

You can set preferences for the behavior of the various editors and features of WebLogic Portal. The following sections describe how to access WebLogic Portal-specific settings within Oracle Enterprise Pack for Eclipse.

4.13.1 Preferences in the WebLogic Portal Section

  1. Select Window > Preferences and then select WebLogic Portal in the tree display.

  2. Click the WebLogic Portal node to see settings that are specific to WebLogic Portal.

    A dialog similar to the example in Figure 4-13 displays:

    Figure 4-13 WebLogic Portal Product Preferences

    Description of Figure 4-13 follows
    Description of "Figure 4-13 WebLogic Portal Product Preferences"

  3. Expand the desired section in the dialog to set options for that editor.

4.13.2 WebLogic Portal Preferences in the General Section

  1. Select Window > Preferences.

  2. Expand the General node in the tree display.

  3. WebLogic Portal settings are available in both the Appearance > Colors and Fonts and the Appearance > Label Decorations sections.

    For example, if you select Appearance > Colors and Fonts, and then select WebLogic Portal > Propagation Tool, a dialog similar to the example in Figure 4-14 displays:

Figure 4-14 Oracle Enterprise Pack for Eclipse Appearance – Colors and Fonts Preferences

Description of Figure 4-14 follows
Description of "Figure 4-14 Oracle Enterprise Pack for Eclipse Appearance – Colors and Fonts Preferences"

In the Propagation Tool node, you can change the assigned colors for status indicators.

In the Rules Editor Font node, you can change the font, style, and size for the Rules Editor that is used for campaigns, user segments, placeholders, and content selectors.

4.14 Adding Apache Beehive Support

Apache Beehive is an open source Java Application Framework for building Java EE based applications. WLP web projects do not include Apache Beehive support by default. You have to explicitly add the appropriate facets to your project to use Apache Beehive features in WLP, such page flow portlets.

To add Apache Beehive support to a WLP web project:

  1. Add the appropriate facets to the web project. For detailed information on the supported configurations of facets for Apache Beehive in WLP, see Section 5.1, "Apache Beehive and Apache Struts Supported Configurations."

    You can either add the facets when you create the project (see Section 4.6, "Portal Web Project Wizard") or you can add them to an existing project (see Section 5.5, "Adding Facets to an Existing Project").

4.15 Adding Apache Struts Support

Apache Struts is an open source Java Application Framework for building Java EE based applications. WLP web projects do not include Struts support by default. You have to explicitly add the appropriate facets to your project to use Struts features in WLP, such as Struts portlets.

To add Apache Struts support to a WLP web project:

  1. Add the appropriate facets to the web project. For detailed information on the supported configurations of facets for Apache Struts in WLP, see Section 5.1, "Apache Beehive and Apache Struts Supported Configurations."

    You can either add the facets when you create the project (see Section 4.6, "Portal Web Project Wizard") or you can add them to an existing project (see Section 5.5, "Adding Facets to an Existing Project").