Portal Development Guide

     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

Use this chapter as you prepare your Workshop for WebLogic 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 Workshop for WebLogic 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 the Getting Started with WebLogic Portal tutorials.

Tip: You can find detailed information about how these setup tasks are related to the deployment of your project in the Production Operations Guide.

This chapter contains the following sections:

 


Roadmap for Environment Setup Tasks

The required environment setup options vary depending on whether you want to develop a “conventional portal,” a collaboration portal, or a “development-free” GroupSpace application. Table 4-1 describes the basic tasks that you should perform in each case:

Table 4-1 Task Roadmap According to Development Goals 
If you want to...
Then in this task...
Select these options...
Develop a “conventional” portal application that does not involve collaboration or GroupSpace
WebLogic Configuration Wizard
In Select Domain Source, select the Weblogic Portal check box. Do not select GroupSpace Framework or GroupSpace Application.
Portal EAR Project Wizard
Default WebLogic Portal facets.
Portal Web Project Wizard
Default WebLogic Portal facets.

Note: You should not include GroupSpace in a conventional portal application. For more information, refer to the GroupSpace Guide.

Copying J2EE library files into your project (for instructions, refer to Copying J2EE Library Files into a Project)
As needed; no specific J2EE libraries required.
Develop a collaboration portal application that uses the Collaboration Portlets but does not involve GroupSpace
WebLogic Configuration Wizard
In Select Domain Source, select the Weblogic Portal GroupSpace Framework check box.

Note: If you do not want to use the Shared Content Repository that the GroupSpace Framework configures, other methods of setting up a repository exist. For details, refer to the Communities Guide.

The wizard automatically selects the WebLogic Portal check box; keep it selected.
Portal EAR Project Wizard
In addition to the default facets, select the WebLogic Portal Collaboration facet and these sub-features:
  • Collaboration API
  • Collaboration Portlets Application Libraries
Portal Web Project Wizard
In addition to the default facets, select the WebLogic Portal Collaboration facet and this sub-feature:
  • Collaboration Portlets
Copying J2EE library files into your project (for instructions refer to Copying J2EE Library Files into a Project).
As needed; no specific J2EE libraries required.
Develop a customized Community application using Workshop for WebLogic, starting from the OOTB sample GroupSpace application
WebLogic Configuration Wizard
In Select Domain Source, select the Weblogic Portal GroupSpace Application check box.
The wizard automatically selects the WebLogic Portal and GroupSpace Framework check boxes; keep them selected.
Portal EAR Project Wizard
In addition to the default facets, select the WebLogic Portal Collaboration facet and these sub-features:
  • Collaboration API
  • Collaboration Portlets Application Libraries
  • GroupSpace Application Libraries
Portal Web Project Wizard
In addition to the default options, select the WebLogic Portal Collaboration facet and these sub-features:
  • Collaboration Portlets
  • GroupSpace

Note: If GroupSpace is enabled in a portal web project, only GroupSpace applications can reside in that web project. If you want to create custom Communities, you must create a separate portal web project that does not include GroupSpace. For more information, refer to the GroupSpace Guide.

Copying J2EE library files into your project (for instructions refer to Copying J2EE Library Files into a Project).
Copy all GroupSpace-related J2EE libraries into your project. For a list of application libraries, refer to WebLogic Portal J2EE Library Descriptions.
Set up a standard GroupSpace application for which you will not perform any development tasks within Workshop for WebLogic (you will use the WebLogic Portal Administration Console to implement your application).
WebLogic Configuration Wizard
In Select Domain Source, select the Weblogic Portal GroupSpace Application check box.
The wizard automatically selects the WebLogic Portal and GroupSpace Framework check boxes; keep them selected.
Portal EAR Project Wizard
Not applicable
Portal Web Project Wizard
Not applicable
Copying J2EE library files into your project
Not applicable

 


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.

A sample portal domain comes with WebLogic Portal and is, by default, located at WebLogic_HOME/samples/domains/portal. This sample domain is configured for use with a GroupSpace application.

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 BEA WebLogic Server Configuration Wizard

BEA WebLogic Server Configuration Wizard

Table 4-2 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.

Table 4-2 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
Select the appropriate check boxes depending on the type of project you want to develop.
For example, you can select the WebLogic Portal GroupSpace Framework and WebLogic Portal GroupSpace Application check boxes to create a domain that is GroupSpace-enabled; projects based on the GroupSpace sample application must have a GroupSpace-enabled domain.
For more information on the options available here, refer to Roadmap for Environment Setup Tasks.
Configure Administrator Username and Password
(Default) user name: weblogic
User password:
Confirm user password:
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 Production Operations Guide.

  • JRockit SDK (recommended)
Customize Environment and Services Settings
No (the default)
Create WebLogic Domain
Domain location: Accept the default, or specify another directory on your system.

 


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 the Workshop for WebLogic workbench, refer to the “Applications and Projects” topic in the Workshop for WebLogic Programmers’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 > Project...
  2. The New Project – Select a Wizard dialog displays.

    Select WebLogic Portal > Portal EAR Project, as shown in Figure 4-2.

    Figure 4-2 New Project – Select a Wizard Dialog with Portal EAR Project Selected


    New Project –  Select a Wizard Dialog with Portal EAR Project Selected

  3. Click Next.
  4. The New Portal EAR Project dialog displays. When you enter a name for your project and click Next, the Select Project Facets dialog displays.

New Portal EAR Project – Select Project Facets Dialog

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

Figure 4-3 New Portal EAR Project – Select Project Facets Dialog

New Portal EAR Project –  Select Project Facets Dialog

Table 4-3 describes each WebLogic Portal– related field of the Select 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 WebLogic Portal and Shared J2EE Libraries.

Table 4-3 New Portal EAR Project Dialog Data Fields - WebLogic Portal Information 
Field
Description
Presets 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.
  • Admin Framework
  • Admin Portal
  • Portal Application Services
  • Portal Customizations Framework
  • Propagation Service
WebLogic Portal (Optional)
This selection adds Commerce Services to the project.
WebLogic Portal Collaboration
Check this box (and one or more of its sub-features) to enable this project as a collaboration-enabled, and potentially GroupSpace-enabled EAR.
For details about creating a GroupSpace application, refer to the Communities Guide and the GroupSpace Guide.

 


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 BEA WebLogic v9.2 Server @ localhost, then select Add and Remove Projects.
  2. The Add and Remove Projects dialog displays, as shown in Figure 4-4.

    Figure 4-4 Add and Remove Projects Dialog


    Add and Remove Projects Dialog

  3. Click to select the desired EAR project 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.

 


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 > Project.
  2. The New Project – Select a Wizard dialog box displays.

  3. Select WebLogic Portal > Portal Web Project, as shown in Figure 4-5.
  4. Figure 4-5 New Project – Select a Wizard Dialog with Portal Web Project Selected


    New Project –  Select a Wizard Dialog with Portal Web Project Selected

  5. Click Next.
  6. The New Portal Web Project dialog displays.

New Portal Web Project – Portal Web Project

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

Figure 4-6 New Portal Web Project Dialog

New Portal Web Project Dialog

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

Table 4-4 New Portal Web Project Dialog Data Fields 
Field
Description
Project name
The name of the portal web project.
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.
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.
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.

New Portal Web Project – Select Project Facets dialog

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

Figure 4-7 New Portal Web Project – Select Project Facets Dialog

New Portal Web Project –  Select Project Facets Dialog

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

Table 4-5 New Portal Web Project Dialog Data Fields - WebLogic Portal Information 
Field
Description
Presets 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.
  • Portal Customizations Framework
  • Portal Framework
  • Portal Framework Struts
  • Portal Visitor Tools
  • Portal Web Application Services
  • WSRP Producer
For more information about each of these sub-features, refer to WebLogic Portal J2EE Library Descriptions.
WebLogic Portal (Optional)
This selection adds Commerce Tag Libraries to the project.
WebLogic Portal Collaboration
Check this box (and one or both of its sub-features) to add the collaboration portlets to the project, or to enable the project as a GroupSpace project.
  • Collaboration Portlets - causes the J2EE library wlp-collab-portlets-app-lib to be associated with your project. You can use these portlets outside a GroupSpace environment.
  • GroupSpace - causes the GroupSpace-related J2EE libraries to be associated with the project. If you select this option, you must also select the Collaboration Portlets sub-feature.
For detailed instructions on creating a GroupSpace-based application, refer to the Communities Guide

Note: Do not add GroupSpace to portal web projects that already contain non-GroupSpace portals. For more information, refer to the Communities Guide.

New Portal Web Project - Web Module Dialog

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

Figure 4-8 New Portal Web Project – Web Module dialog

New Portal Web Project –  Web Module dialog

Table 4-6 describes each field of the dialog.

Table 4-6 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.

New Portal Web Project - WebLogic Web Module Dialog

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

Figure 4-9 New Portal Web Project – WebLogic Web Module Dialog

New Portal Web Project –  WebLogic Web Module Dialog

Table 4-7 describes the dialog.

Table 4-7 New Portal Web Project – WebLogic Web Module Dialog Description 
Field
Description
Shared J2EE Libraries selection buttons
If you select the Use Shared J2EE Libraries radio button, WebLogic Portal creates associations with shared J2EE libraries rather than copying the complete set of JAR files into your project. BEA recommends that you use shared J2EE libraries because of their significant advantages in source control, file sharing, and patch application. With any future patch installations, WebLogic Portal supports only configurations that do not have copied J2EE library resources in the project. For more information about shared J2EE libraries, refer to WebLogic Portal and Shared J2EE Libraries.
If you select not to use shared J2EE libraries, all of the necessary JAR files will be copied directly into the project.

 


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 > Project.
  2. The Select a Wizard dialog box displays.

  3. In the dialog, select WebLogic Portal > Datasync Project, as shown in Figure 4-10.
  4. Figure 4-10 New—Select a Wizard Dialog with Datasync Project Selected


    New—Select a Wizard Dialog with Datasync Project Selected

  5. Click Next.
  6. The Create New Datasync Project dialog displays.

Portal Datasync Project Wizard - Create New Datasync Project Dialog

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

Figure 4-11 Create New Datasync Project Dialog

Create New Datasync Project Dialog

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

Table 4-8 New Datasync Project Data Fields  
Field
Description
Project name
The name that you want to assign to this datasync web project.
Project Contents
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 default Java source directory name src is automatically displayed; you can change it if you wish.
Create default project directories
This check box is selected by default.
Create default project files
This check box is selected by default.

Create New Datasync Project – EAR Projects

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

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

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.

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

Figure 4-13 Datasync Project Added to the Package Explorer

Datasync Project Added to the Package Explorer

 


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.

If you are not using the Portal Perspective, you should open the Merged Projects view in the workbench. To do so, perform these steps:

  1. Select Window > Show View > Other.
  2. Expand the WebLogic Portal node in the tree if it is not already expanded, and click to select Merged Projects, as shown in Figure 4-14.
  3. Tip: Some items listed in the Merged Projects view are italicized. The italicized items represent entities that are stored in shared J2EE libraries. All entities that are stored on your filesystem, such as the portal file you created, are shown in regular type.
    Figure 4-14 Show View Dialog with Merged Projects View Selected


    Show View Dialog with Merged Projects View Selected

    Notice that other useful portal-specific views are available here. Experiment to find the best combination of views that you want to have available as you develop portals.

  4. Click OK.
  5. The additional view is added to the workbench.

Note: You can view a Properties dialog for a file in the Merged Projects view by right-clicking the file and selecting Properties. The dialog shows the J2EE library information for the file, including the shared J2EE library name and version.
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.

 


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:

 


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 Workshop for WebLogic, using the Window > Preferences options. For more information, refer to your Eclipse documentation.

 


Setting WebLogic Portal Preferences in Workshop for WebLogic

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 Workshop for WebLogic.

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.
  3. A dialog similar to the example in Figure 4-15 displays:

    Figure 4-15 WebLogic Portal Product Preferences


    WebLogic Portal Product Preferences

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

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.
  4. 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-16 displays:

    Figure 4-16 Workshop for WebLogic Appearance – Colors and Fonts Preferences


    Workshop for WebLogic 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.


  Back to Top       Previous  Next