Tutorials – Getting Started with WebLogic Portal

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Setting Up Your Portal Development Environment

This tutorial helps you prepare your Workshop for WebLogic environment for portal development.

For more detailed information about each dialog of the wizards used in this chapter, refer to the Portal Development Guide.

 


Before You Begin

Before starting this tutorial, do the following:

 


Tutorial Steps

Using the tutorial, you will perform tasks that are required to get your Workshop for WebLogic 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.

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 Workshop for WebLogic.
  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.
  3. If necessary, dismiss the Welcome screen to display the workbench.

  4. If the Portal perspective is not already open, select it by choosing Window > Open Perspective > Other > Portal.
  5. The instructions and figures in this tutorial are based on the views that are available in the Portal perspective.

  6. Choose File > New > Other.
  7. The New – Select a Wizard dialog displays, as shown in Figure 2-1.

    Figure 2-1 New – Select a Wizard Dialog


    New –  Select a Wizard Dialog

  8. Expand Server in the tree, click Server in the expanded tree, and then click Next.
  9. The New Server – Define a New Server dialog displays, as shown in Figure 2-2.

    Figure 2-2 New Server – Define a New Server Dialog


    New Server –  Define a New Server Dialog

  10. In the tree, verify that Oracle is expanded and that Oracle WebLogic Server v10.3 is selected. The host name localhost is shown in the Host name field. For the tutorial, leave this entry unchanged.
  11. Click Next.
  12. The New Server – Oracle WebLogic Server v10.3 dialog displays, as shown in Figure 2-3.

    Figure 2-3 New Server Dialog


    New Server Dialog

  13. Click the link that is labeled Click here to launch Configuration Wizard to create a new domain.
  14. The Oracle WebLogic Configuration Wizard starts, as shown in Figure 2-4.

    Figure 2-4 Oracle WebLogic Server Configuration Wizard


    Oracle WebLogic Server Configuration Wizard

  15. 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 Oracle products list, select WebLogic Portal amd Workshop for WebLogic 10.3.
    Notice that a WebLogic Portal Collaboration Repository check box is available on this wizard dialog; portal projects that use GroupSpace or Collaboration Portlets features must have a domain that includes this repository. This tutorial does not use these features, so it can remain unselected.
    Configure Administrator Username and Password
    User name: weblogic
    User password: weblogic
    Confirm user password: weblogic
    Configure Server Start Mode and JDK
    • Development Mode
    • JRockit SDK (recommended)
    Customize Environment and Services Settings
    No (the default)
    Create WebLogic Domain
    Domain name: myPortalDomain
    Domain location: Accept the default, or specify another directory on your system.
  16. When you are finished with these entries, click Create in the Create WebLogic Domain dialog.
  17. The Creating Domain status page appears, indicating the progress of the domain creation.

  18. When the domain is created, click Done.
  19. The display returns to the New Server – Oracle WebLogic Server v10.3 dialog.

  20. Click Browse and navigate to the directory of the domain that you just created. By default, the path is <BEA_HOME>/user_projects/domains/myPortalDomain.
  21. In the Browse for Folder dialog, select the domain directory and click OK to return to the Define a New Server – Oracle WebLogic Server v10.3 dialog.
  22. Click Finish.
  23. The new server displays in the Servers view in the Workshop for WebLogic 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.

    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 Workshop for WebLogic
    Oracle WebLogic Server Configuration Wizard

Create a Portal EAR Project

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 the workbench, refer to the “Applications and Projects” topic in the Workshop for WebLogic Help.

In this task, you will create an Enterprise Application (EAR) project that is customized to contain WebLogic Portal information. For more information about the Portal EAR Project, refer to the Portal Overview.

To create a Portal EAR project, perform these steps:

  1. Be sure you have set up the example environment and domain, as explained previously in Create a Portal Domain.
  2. From the File menu, select New > Portal EAR Project.
  3. In the New Portal EAR Project dialog, enter myPortalEAR in the Project Name field, leave the other entry fields unchanged, and click Next.
  4. The New Portal EAR Project – Project Facets dialog displays.

  5. In the New Portal EAR Project – Project Facets dialog, verify that WebLogic Portal and all features that fall under the WebLogic Portal node are selected, as shown in Figure 2-6.
  6. Figure 2-6 New Portal EAR Project – Select Project Facets Dialog


    New Portal EAR Project –  Select 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, refer to the Portal Development Guide.

  7. Click Finish.
  8. 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 EAR content folder and the required APP-INF and META-INF directories for the project.

    Figure 2-7 Package Explorer View including Portal EAR Project
Note: The error icon on the EAR folder appears because the Portal EAR Project references library modules that have not yet been added to the project. Later in this tutorial when you create a Portal Web Project, the library modules will be added and the error icon will disappear when Workshop for WebLogic automatically rebuilds the workspace.

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, perform these steps:

  1. In the Servers view (as shown in Figure 2-5), right-click Oracle WebLogic Server v10.3 , then select Add and Remove Projects.
  2. The Add and Remove Projects dialog displays, as shown in Figure 2-8.

    Figure 2-8 Add and Remove Projects Dialog


    Add and Remove Projects Dialog

  3. Click to select myPortalEAR in the Available projects column and then click Add.
  4. The project is added to the Configured projects column on the right.

  5. Click Finish.
  6. 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.

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, perform these steps:

  1. Select File > New > Portal Web Project. The New Portal Web Project dialog displays, as shown in Figure 2-9.
  2. Figure 2-9 New Portal Web Project Dialog


    New Portal Web Project Dialog

  3. In the New Portal Web Project dialog, enter myPortalWebProject in the Project name field.
  4. In the Project contents area of the dialog, leave the default setting unchanged.

  5. Select the Add project to an EAR check box.
  6. Because myPortalEAR is the only EAR project, it appears in the dropdown menu by default.

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

  7. Click Next.
  8. The New Portal Web Project – Project Facets dialog displays.

  9. In the New Portal Web Project – Select Project Facets dialog, verify that the WebLogic Portal node is selected. Also, be sure that all of the features under the WebLogic Portal node are selected, as shown in Figure 2-10.
  10. Figure 2-10 New Portal Web Project – Select Project Facets Dialog


    New Portal Web Project –  Select Project Facets Dialog

  11. Click Finish.
  12. 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 required directory structure for the project. For more information about the use of Library Modules in WebLogic Portal, refer to the Portal Development Guide.

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


    Portal Web Project Added to the Package Explorer

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.

Tip: For more detailed information on the Create New Datasync Project wizard, see Portal Dataysnc Project Wizard in the Portal Development Guide.

To create the datasync project, perform these steps:

  1. Select File > New > Datasync Project. The Create New Datasync Project – New Datasync Project dialog displays, as shown in Figure 2-12.
  2. Figure 2-12 Create New Datasync Project Dialog


    Create New Datasync Project Dialog

  3. In the Create New Datasync Project – New Datasync Project dialog, enter myData in the Project name field.
  4. In the other areas of this dialog, leave the default settings unchanged.

  5. Click Next.
  6. The Create New Datasync Project – EAR Projects dialog displays, as shown in Figure 2-13.

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


    Create New Datasync Project –  EAR Projects Dialog

  7. Be sure the myPortalEAR check box is selected.
  8. This associates the Datasync project with the Portal EAR project that you created previously.

    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.
  9. Click Finish.
  10. 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


    Datasync Project Added to the Package Explorer

 


Summary

With the completion of this tutorial, 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 using the Workshop for WebLogic workbench, continue to Creating a Portal in Your Development Environment.


  Back to Top       Previous  Next