WLSKB005 - Creating a Nested Page Flow Tutorial

Popular Courses

Browse Our Free Resources

  • whitepapers
  • whitepapers
  • webinars
  • blogs

Our Locations

Training Centres

Vancouver, BC
Calgary, AB
Edmonton, AB
Toronto, ON
Ottawa, ON
Montreal, QC
Hunt Valley

locations map


550 6th Av SW
Suite 475
Calgary, AB
T2P 0S2


821A Bloor Street West
Toronto, ON
M6G 1M1


409 Granville St
Suite 902
Vancouver, BC
V6C 1T2

U.S. Office

436 York Road
Suite 1
Jenkintown, PA

Other Locations

Dallas, TX
Miami, FL

Web Age Solutions Inc.


A nested Page Flow represents an abstract use case according to the Rational Unified Process (RUP). It is a sequence of user activities that on itself does not produce any desired result. The sequence is always performed as a part of a bigger sequence of activities. For example, a user may decide to create a new address from the shipping page and billing page. A new address can also be created from the addressbook management page. Here, the "create address" use case is abstract.

In WebLogic Workshop, a nested Page Flow can be used to implement the "create address" use case. Once completed, other "concrete" Page Flows can simply use the nested use case. This way, nested Page Flow can significantly encourage re-use and speed up development.

In this tutorial, we will develop a nested Page Flow that shows a copyright page. We will add this nested Page Flow in the Login Page Flow created in an earlier tutorial.

Before You Get Started

This tutorial is a continuation of WLSKB003. You must successfully complete that tutorial before starting this one.

Create the Nested Page Flow

Launch WebLogic Workshop. Make sure that the BasicApp application (created in a previous tutorial) is open.

Right click on BasicAppWeb and select New->Page Flow.

Enter CopyrightFlow as the name of the Page Flow. Check the Make this a nested page flow check box. Click on Next. Click on Create.

System generates a skeletal flow. The index.jsp file contains a hyperlink to the done action. The done action forwards to an imaginary action called CopyrightFlowDone. A concrete Page Flow that uses this nested flow must provide an implementation of the CopyrightFlowDone action. This type of action is actually known as an Exit Point for a nested Page Flow.

Switch to the Source View and inspect the done action.

 * @jpf:action
 * @jpf:forward name="done" return-action="CopyrightFlowDone"
 public Forward done()
     return new Forward("done");

Note, that the exit point has been specified using the the return-action attribute instead of the usual path attribute.

Double click on index.jsp. Replace the text "New Web Application Page" with "Copyright message here!".

Save all changes (Control+S). Close all files (Control+Shift+F4).

Use the Nested Flow

Under the LoginFlow folder double click on LoginFlowController.jpf. Drag and drop CopyrightFlowController.jpf into the flow diagram.

Notice that the CopyrightFlow nested flow is hard wired to forward to the CopyrightFlowDone action. This action needs to be implemented as indicated by the green underline and faded color of the action.

Right click on CopyrightFlowDone and select Create.

Delete the arrow that connects the Login action with home.jsp.

Connect the Login action to CopyrightFlow. Connect CopyrightFlowDone to home.jsp.

The main flow will proceed as follows. If the Login action succeeds, it will forward to the CopyrightFlow nested flow. The inner workings of a nested flow are immaterial to the main flow. After the nested flow ends, it will forward to the main flow's CopyrightFlowDone action. The CopyrightFlowDone action forwards to home.jsp.

Save all changes.


Start the WebLogic server if not already started. Open a web browser and enter the URL: http://localhost:7001/BasicAppWeb/LoginFlow/

Login using the user ID bob and password bobcat. You should see the copyright page.

Click on the exit link. You should be taken to the home page.


Email Address: *

Very useful Somewhat useful Not bad Needs many corrections


( * ) = mandatory field