![]() ![]() ![]() ![]() ![]() ![]() |
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 starting this tutorial, do the following:
This task is optional, but if you are unfamiliar with the Eclipse development environment on which Workshop for WebLogic is based, the Getting Started tutorial is highly recommended; the tutorial shows you how to start Workshop for WebLogic and navigate the workbench user interface, introduces terminology associated with the workbench, and shows you how to create a simple web application.
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.
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:
The Workshop for WebLogic workbench displays.
The instructions and figures in this tutorial are based on the views that are available in the Portal perspective.
The New - Select a Wizard dialog displays, as shown in Figure 2-1.
The New Server - Define a New Server dialog displays, as shown in Figure 2-2.
The host name localhost is shown in the Host name field. For the tutorial, leave this entry unchanged.
The New Server - New BEA WebLogic Server dialog displays, as shown in Figure 2-3.
The BEA WebLogic Configuration Wizard starts, as shown in Figure 2-4.
The Creating Domain status page appears, indicating the progress of the domain creation.
The display returns to the New Server - New BEA WebLogic Server dialog.
\user_projects\domains\myPortalDomain
. 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.
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:
The New Project - Select a wizard dialog displays.
Expand the WebLogic Portal folder if needed, and select WebLogic Portal > Portal EAR Project, as shown in Figure 2-6.
myPortalEAR
in the Project Name field, leave the other entry fields unchanged, and click Next. The New Portal EAR Project - Select Project Facets dialog displays, as shown in Figure 2-7.
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.
The Portal EAR Project node is added to the Package Explorer view, as shown in Figure 2-8. If you expand the folder you can see the EAR content folder and the required APP-INF and META-INF directories for the 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. |
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:
The Add and Remove Projects dialog displays, as shown in Figure 2-9.
myPortalEAR
in the Available projects column and then click Add. 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.
In this task you create the web project that will contain the actual portal.
To create the portal web project, perform these steps:
The New Project - Select a Wizard dialog box displays.
The New Portal Web Project dialog displays, as shown in Figure 2-11.
myPortalWebProject
in the Project name field. In the Project contents area of the dialog, leave the default setting unchanged.
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.
Tip: | If you create a portal web project without associating it with an EAR, you can do this step later by right-clicking the EAR project in the Package Explorer tree and selecting Properties; then use the J2EE Module Dependencies setting to associate the project with the EAR. |
The New Portal Web Project - Select Project Facets dialog displays, as shown in Figure 2-12.
The myPortalWebProject
folder now appears in the Package Explorer view, as shown in Figure 2-13. 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.
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:
The Select a Wizard dialog box displays.
The Create New Datasync Project - Add Datasync Project dialog displays, as shown in Figure 2-15.
myData
in the Project name field. In the other areas of this dialog, leave the default settings unchanged.
The Create New Datasync Project - EAR Projects dialog displays, as shown in Figure 2-16.
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. |
The myData
folder now appears in the Package Explorer window, as shown in Figure 2-17. If you expand the folder you can see the src
folder and the data directory structure for the project.
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.
![]() ![]() ![]() |