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

Step 5: Create a Test Project

You'll use the steps in this topic to create a web project with which to test your EJBs. As with the EJB project you created earlier, this project is a framework within which to write your source code. You'll add the code in the next step.

In this section, you will:

To Create a Web Project for Testing the EJB

Begin by creating a web project that will contain the user interface code you'll use to make sure your EJB is doing what it should.

When you create a WebLogic web project, you get the beginnings of a Java Page Flow (also known as a JPF or page flow). A page flow makes it easier for you to keep client logic and presentation separate, as you'll see in the next step.

  1. Click File > New > Project.
  2. In the New Project dialog, expand Web, click Dynamic Web Project, then click Next.
  3. In the New Dynamic Web Project dialog, in the Project name box, enter VisitWebTest.
  4. Place a check next to Add project to an EAR. From the dropdown menu, select EJBTutorial_EARProject.
  5. Click Finish.

To Set Properties to Build and Run

With these steps, you'll set web project properties to useful values for testing the EJBs.

  1. In the Package Explorer, right-click VisitWebTest, then click Properties.
  2. In the properties dialog, in the left pane, click Server.
  3. In the right pane, in the Default server box, click BEA WebLogic Server v10.0.

    This ensures that your test web project uses the server domain you created earlier.

  4. Click OK.

With your test project created, it's time to move on to writing test code.

Related Topics


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


Skip navigation bar   Back to Top