Skip Headers
Oracle® Fusion Middleware Tutorials for Oracle WebLogic Portal
10g Release 3 (10.3.4)

Part Number E14252-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

2 Setting Up Your Portal Development Environment

This tutorial helps you prepare your Oracle Enterprise Pack for Eclipse environment for portal development.

For more detailed information about each dialog of the wizards used in this chapter, see the Oracle Fusion Middleware Portal Development Guide for Oracle WebLogic Portal.

2.1 Before You Begin

Before starting this tutorial, do the following:

2.2 Tutorial Steps

Using the tutorial, you will perform tasks that are required to get your Oracle Enterprise Pack for Eclipse environment ready for portal development.

The tutorial includes instructions on how to perform these tasks:

In your actual development environment, you do not need to follow the order of the steps as presented in this tutorial; for example, you can create the portal domain after performing all the other steps. However, we recommend that you follow the steps as presented here so that you can easily see the relationships among the parts of a portal project.

2.2.1 Create a Portal Domain

The portal domain is a group of WebLogic Server resources that contain the application server used by the portal. 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.

To create a portal domain, perform these steps:

  1. Start Oracle Enterprise Pack for Eclipse (the IDE). You can run the executable file <MW_HOME>/oepe_11gR1PS1/eclipse/eclipse.exe. On Windows, you can also start the IDE from the Start menu by selecting Start > My Programs > Oracle WebLogic > Eclipse for WebLogic 10.3.4.

  2. When asked to select a workspace, click Browse and select (or create) a workspace folder. Follow the dialog prompts as appropriate. For this tutorial, we recommend that you create a new workspace.

    If necessary, dismiss the Welcome screen to display the workbench.

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

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

  4. From the menu bar, select File > New > Other.

  1. In the New dialog, expand Server in the Wizards tree and then click Server, if not already selected. (Figure 2-1)

    Figure 2-1 The New Dialog for Selecting a Wizard

    Description of Figure 2-1 follows
    Description of "Figure 2-1 The New Dialog for Selecting a Wizard"

  2. Click Next.

  1. In the New Server dialog, in the Select the server type list, verify that Oracle is expanded and Oracle WebLogic Server 11gR1 PatchSet 1 is selected. (Figure 2-2)

    In the Server's host name field, localhost is shown. For the tutorial, leave this entry unchanged.

    Figure 2-2 New Server Dialog

    Description of Figure 2-2 follows
    Description of "Figure 2-2 New Server Dialog"

  2. Click Next.

  1. On the Oracle WebLogic Server 11gR1 page, click the link labeled Click here to launch Configuration Wizard to create a new domain. (Figure 2-3)

    Figure 2-3 Launching the Configuration Wizard

    Description of Figure 2-3 follows
    Description of "Figure 2-3 Launching the Configuration Wizard"

    The Fusion Middleware Configuration Wizard displays, as shown in Figure 2-4.

    Figure 2-4 Fusion Middleware Configuration Wizard

    Description of Figure 2-4 follows
    Description of "Figure 2-4 Fusion Middleware Configuration Wizard"

  1. Follow the wizard prompts and enter the values shown in Table 2-1. Click Next as appropriate to continue through the wizard.

    Table 2-1 Configuration Wizard Values

    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. This tutorial does not use these features, so it can remain unselected. For information about Collaboration Portlets, see the Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.

    Specify Domain Name and Location

    Domain name: myPortalDomain

    Domain location: Accept the default, or specify another directory on your system.

    Configure Administrator Username and Password

    User name: weblogic

    User password: webl0gic

    Confirm user password: webl0gic

    Note: A valid password must contain at least one non-alphabetic character. In this case, the "0" in webl0gic is a zero character. Please remember the login and password you use for this step; you will need to use it again later in the tutorial.

    Configure Server Start Mode and JDK

    • Development Mode

    • 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 default Derby database. Because 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 Derby database. You must click the Run Scripts button before continuing.

    Select Optional Configuration

    Use the defaults. Just click Next.


  1. When you are finished with these entries, click Create on the Configuration Summary page.

    The Creating Domain status page appears, indicating the progress of the domain creation.

  2. When the domain is created, click Done.

    The display returns to the New Server – Oracle WebLogic Server 11gR1 PatchSet 1 dialog.

  3. Click the Browse button next to the Domain Directory field and navigate to the directory of the domain that you just created. By default, the path is MW_HOME/user_projects/domains/myPortalDomain.

  4. In the Browse for Folder dialog, select the domain directory and click OK.

  5. In the New Server dialog, click Finish.

    The new server displays in the Servers view in the Oracle Enterprise Pack for Eclipse workbench, and a Servers node is added to the tree in the Package Explorer view. Figure 2-5 shows the Servers view and the new server. If you don't see this view, select Window > Show View > Servers > Server.

    For now, you do not need to start the server. Later in this tutorial, you will create a simple portal application, start the server, and run the portal application on the server.

    Figure 2-5 New Server Displayed in Oracle Enterprise Pack for Eclipse

    Description of Figure 2-5 follows
    Description of "Figure 2-5 New Server Displayed in Oracle Enterprise Pack for Eclipse"

2.2.2 Create a Portal EAR Project

An Enterprise Archive (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 the workbench, see the "Applications and Projects" topic in the Oracle Enterprise Pack for Eclipse Help.

In this task, you will create an EAR project that is customized to contain WebLogic Portal information. For more information about the Portal EAR project, see the Oracle Fusion Middleware Overview for Oracle WebLogic Portal.

To create a Portal EAR project:

  1. Select Window > Open Perspective > Portal to switch to the Portal perspective.

  2. Be sure you have set up the example environment and domain, as explained in Section 2.2.1, "Create a Portal Domain."

  3. In Oracle Enterprise Pack for Eclipse, Select File > New > Portal EAR Project.

  4. In the New Portal EAR Project dialog, enter myPortalEAR in the Project name field.

  5. In the Configuration section, click Modify.

  6. In the Project Facets dialog, verify that the WebLogic Portal node is selected in the Project Facets dialog, as shown in Figure 2-6.

    Figure 2-6 Project Facets Dialog

    Description of Figure 2-6 follows
    Description of "Figure 2-6 Project Facets Dialog"

    The selections WebLogic Portal (Optional) and WebLogic Portal Collaboration are also available here. These selections are not needed for the tutorial; leave them unselected. For more information about what happens when you select these options, see the Oracle Fusion Middleware Overview for Oracle WebLogic Portal. For information about the Collaboration Portlets, see the Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.

  7. Click OK to exit the Project Facets dialog.

  1. Click Finish.

    The Portal EAR Project node is added to the Package Explorer view, as shown in Figure 2-7. If you expand the folder you can see the EARcontent folder and the required APP-INF and META-INF directories for the project.

    Figure 2-7 Portal EAR Project in the Package Explorer View

    Description of Figure 2-7 follows
    Description of "Figure 2-7 Portal EAR Project in the Package Explorer View"

2.2.3 Associate the EAR Project with the Server

You need to explicitly associate the EAR project with the server that you created previously, so that later you can test the project on that server.

To associate the Portal EAR project with the server:

  1. In Oracle Enterprise Pack for Eclipse, in the Servers view (as shown in Figure 2-5), right-click Oracle WebLogic Server 11gR1 PatchSet 1, and then select Add and Remove.

  1. In the Add and Remove Projects dialog, in the Available column, select myPortalEAR and then click Add. (Figure 2-8)

    Figure 2-8 Add and Remove Projects Dialog

    Description of Figure 2-8 follows
    Description of "Figure 2-8 Add and Remove Projects Dialog"

    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.

2.2.4 Create a Portal Web Project

In this task, you create the web project that will contain the actual portal.

To create the portal web project:

  1. In Oracle Enterprise Pack for Eclipse, select File > New > Portal Web Project.

  1. In the New Portal Web Project dialog, enter myPortalWebProject in the Project name field. (Figure 2-9)

    Figure 2-9 New Portal Web Project Dialog

    Description of Figure 2-9 follows
    Description of "Figure 2-9 New Portal Web Project Dialog"

  2. Select the Add project to an EAR checkbox, if not selected by default.

    Because myPortalEAR is the only EAR project, it appears in the EAR Project Name list by default.

    This associates the Portal EAR project that you created previously with this Portal Web project.

  3. In the Configuration section of the dialog, click Modify.

  4. In the Project Facets dialog, verify that the WebLogic Portal node is selected. Click OK to exit the Project Facets dialog.

    Figure 2-10 Project Facets Dialog for Portal Web Project

    Description of Figure 2-10 follows
    Description of "Figure 2-10 Project Facets Dialog for Portal Web Project"

  5. Click Finish.

The myPortalWebProject folder now appears in the Package Explorer view, as shown in Figure 2-11. If you expand the folder you can see the default library modules and the required directory structure for the project. For more information about the use of Library Modules in WebLogic Portal, see the Oracle Fusion Middleware Portal Development Guide for Oracle WebLogic Portal.

Figure 2-11 Portal Web Project Added to the Package Explorer

Description of Figure 2-11 follows
Description of "Figure 2-11 Portal Web Project Added to the Package Explorer"

2.2.5 Create a Datasync Project

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 a datasync project:

  1. In Oracle Enterprise Pack for Eclipse, select File > New > Datasync Project.

  1. In the Create New Datasync Project dialog, enter myData in the Project name field. (Figure 2-12)

    In the other areas of this dialog, leave the default settings unchanged.

    Figure 2-12 Create New Datasync Project Dialog

    Description of Figure 2-12 follows
    Description of "Figure 2-12 Create New Datasync Project Dialog"

    Tip:

    For more information about the Create New Datasync Project dialog, see "Portal Dataysnc Project Wizard" in the Oracle Fusion Middleware Portal Development Guide for Oracle WebLogic Portal.
  2. Click Next.

  1. On the EAR Projects page, ensure the myPortalEAR checkbox is selected, as shown in Figure 2-13.

    This associates the Datasync project with the Portal EAR project that you created previously.

    Figure 2-13 Create New Datasync Project – EAR Projects Page

    Description of Figure 2-13 follows
    Description of "Figure 2-13 Create New Datasync Project – EAR Projects Page"

    Tip:

    If you create a datasync project without associating it with an EAR, then you can associate it later by right-clicking the datasync project in the Package Explorer tree and selecting Properties; then you can expand the Datasync node in the tree and select EAR Projects to associate the project with the EAR.
  2. Click Finish.

    The myData folder now appears in the Package Explorer window, as shown in Figure 2-14. If you expand the folder you can see the src folder and the data directory structure for the project.

    Figure 2-14 Datasync Project Added to the Package Explorer

    Description of Figure 2-14 follows
    Description of "Figure 2-14 Datasync Project Added to the Package Explorer"

2.3 Summary

With the completion of this chapter, you have created the basic required elements of a portal development environment. These components are created on your file system in your current workspace.

To learn about some basic portal development tasks that can be performed by using the Oracle Enterprise Pack for Eclipse workbench, continue to Chapter 3.