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 w ith 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:
The required environment setup options vary depending on whether you want to develop a “conventional portal,” a collaboration portal, or a GroupSpace application. Table 4-1 describes the basic tasks that you should perform in each case:
|
||||
Copying J2EE library files into your project (for instructions, refer to Copying J2EE Library Files into a Project)
|
||||
|
||||
Copying J2EE library files into your project (for instructions refer to Copying J2EE Library Files into a Project).
|
The instructions and figures in this guide are based on the views that are available in the Portal perspective.
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 Sample Applications and Domain” in the WebLogic Portal Release Notes 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.
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.
For example, you can select the WebLogic Portal GroupSpace Framework check box to create a domain that is GroupSpace-enabled.
For more information on the options available here, refer to Roadmap for Environment Setup Tasks.
|
|
For information on the implications of using either of these options, refer to the Production Operations Guide. |
|
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 Workshop for WebLogic, 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:
Figure 4-2 shows an example of the New Portal Web 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.
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.
|
|||
Check this box to add additional services to your project. Included services include Commerce and the integration with portal analytics.
|
|||
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.
|
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:
The Add and Remove Projects dialog displays, as shown in Figure 4-3.
The project is added to the Configured projects column on the right.
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.
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:
Figure 4-4 shows an example of the New Portal Web Project dialog.
Table 4-4 describes each field of the New Portal Web Project – Portal Web Project dialog.
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 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.
|
The New Portal Web Project – Select Project Facets dialog is shown in Figure 4-5.
Table 4-5 describes each WebLogic Portal– specific field of the dialog.
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.
|
|||
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.
For detailed instructions on creating a GroupSpace-based application, refer to the Communities Guide
|
|||
The New Portal Web Project – Web Module dialog is shown in Figure 4-5.
Table 4-6 describes each field of the dialog.
The New Portal Web Project – WebLogic Web Module dialog is shown in Figure 4-7.
Table 4-7 describes the dialog.
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. Oracle 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.
|
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:
Table 4-8 describes each field of the dialog. When you click Next, the EAR Projects dialog displays.
If checked, a default datasync folder structure is created automatically (for an example, see Figure 4-10). If unchecked, no directory structure is created.
|
|||
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 Associating Web and Datasync Projects with EAR Projects.
|
The Create New Datasync Project – EAR Projects dialog is shown in Figure 4-9.
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 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-10.
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.
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. |
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. |
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:
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.
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 Production Operations Guide.
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.
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:
Tip: | You can customize the browser setting so that an external browser displays the application; to do this, select Window > Preferences > General > Web Browser and select the appropriate external browser application. |
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:
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.
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.
A dialog similar to the example in Figure 4-11 displays:
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-12 displays:
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.