Lesson 1: Define navigation rules

You define navigation rules in the faces-config.xml file.

NoteBefore you begin, verify that you have stopped the Tomcat server.

StepsDefining navigation rules

  1. In the WorkSpace Navigator, expand the Tutorial\webroot\WEB-INF folders, right-click the faces-config.xml file and select Open from the context menu.

    The XML file displays in the JSF Application Configuration editor.

  2. To select the Web pages to link, select the Navigation tab at the bottom of the editor.

  3. Drag and drop the login.jsp and getTimeService.jsp files from the WorkSpace Navigator onto faces-config.xml file.

  4. Select Window|Show View|Palette to open the Palette view to link the login.jsp page to the getTimeService.jsp page.

  5. Select the Link control and drag it onto the editor.

  6. Click the login.jsp page and draw a line to the getTimeService.jsp page.

  7. Click getTimeService.jsp to release the cursor and set the link arrow in place.

  8. In the Palette view, select the Select control and then select the link arrow.

  9. Click the Properties tab at the bottom the perspective to define the link properties.

  10. In the From Outcome field, enter success.

  11. Select File|Save from the menu bar to save the faces-config.xml file.