Previous Next vertical dots separating previous/next from contents/index/pdf

Step 1: Create a JSF Enabled Web Project

In this step you will set up a JSF-enabled web project.

The tasks in this step are:

To Create a New Workspace

If you haven't started Workshop for WebLogic yet, follow these steps to do so.

... on Microsoft Windows

If you are using a Windows operating system, follow these instructions.

...on Linux

If you are using a Linux operating system, follow these instructions.

  1. In the Workspace Launcher dialog, click the Browse button. (If Workshop for WebLogic is already running, select File > Switch Workspace. )
  2. In the Select Workspace Directory dialog, navigate to a directory of your choice and click Make New Folder.
  3. Name the new folder JSFTutorial, press the Enter key and click OK.
  4. In the Workspace Launcher dialog, click OK.
  5. Close the Welcome view.

To Create a New Web Project and a New EAR Project

  1. Right-click anywhere within the Project Explorer view and select New > Dynamic Web Project.
    Click Next.
  2. In the Project Name field, enter JSFWeb.
    Place a checkmark next to Add project to an EAR.
    Confirm that the field EAR Project Name shows the value: JSFWebEAR.
    Click Next.

  3. Place a check mark next to the facet JSF (circled in red in the image below).
    Click Finish.

  4. When you are asked to switch to the J2EE perspective, in the Open Associated Perspective dialog, click Yes.

To Import Files into the Web Project

In this step you will import control files into your web project, control files that provide access to customer data.

  1. On the Project Explorer tab, open the nodes JSFWeb > Java Resources.
  2. Open Windows Explorer (or your operating system's equivalent) and navigate to the directory BEA_HOME/workshop_10.0/ workshop4WP/eclipse/plugins/com.bea.workshop.product.wl.samples_1.0.0/tutorials/resources/jsf/ and locate the folders businessObjects and controls.
  3. Drag the folders businessObjects and controls into the Project Explorer tab directly onto the folder JSFWeb/Java Resources/src.
  4. Confirm that the following directory and file structure exists before proceeding.

To Add a WebLogic Server

In this step you will point to a server where you can deploy your application.

Note: If you have executed the JSF tutorial before, it is recommended that you either (1) remove previous JSF tutorial code from your server or (2) create a new server domain.

  1. Click the Servers tab.
  2. Right-click anywhere within the Servers tab, and select New > Server.
  3. In the New Server dialog, select BEA Systems > BEA WebLogic Server v10.0.
    Click Next.
  4. In the Domain home field, use the pulldown to set the domain to BEA_HOME/wlserver_10.0/samples/domains/workshop. (Note: if you are using a newly created server domain for the JSF tutorial, then use the Browse button to navigate to that new server domain, e.g., BEA_HOME/user_projects/domains/base_domain.)
    Click Next.
  5. In the Available projects column, select JSFWebEAR. Click the Add button to move the selected project to the Configured projects column.
  6. Click Finish.

    A new server is added to the Servers tab.

You can use the Servers tab to manage your servers and project deployments as you develop your applications.

To deploy or undeploy a project from a server, right-click the server and select Add and Remove Projects.

For more properties, double-click a server.

Related Topics

Integrating Java Server Faces into a Web Application

Click one of the following arrows to navigate through the tutorial:


Skip navigation bar   Back to Top