"Shopping Cart" Login Sample

The sample uses a nested Page Flow to log users into the nesting Page Flow. When unauthorized users try to invoke a particular method in the nesting Page Flow, they are sent to the nested Page Flow for a username password challenge.

This strategy is called a "shopping cart" login, because unauthorized users are allowed to navigate part of the nesting page flow (e.g., the product catalog), but when they try to purchase their selections, they are required to login.

Concepts Demonstrated by this Sample

Location of Sample Files

In the SamplesApp, the samples are located at:

SamplesApp/WebApp/security/shoppingCartLogin/shopping/shoppingController.jpf

On the local file system, the samples are located at:

[BEA_HOME]\weblogic81\samples\workshop\SamplesApp\WebApp\security\shoppingCartLogin\shopping\shoppingController.jpf

To Run the Samples

  1. Start WebLogic Server in the Workshop domain.

    • On Microsoft Windows systems, run

      [BEA_HOME]/weblogic81/samples/domains/workshop/startWebLogic.cmd

    • On Linux or Solaris systems, run:

      [BEA_HOME]/weblogic81/samples/domains/workshop/startWebLogic.sh

  2. Launch the page flows either by opening SamplesApp/WebApp/security/shoppingCartLogin/shopping/shoppingController.jpf in WebLogic Workshop and clicking the Start button or by entering http://localhost:7001/WebApp/security/shoppingCartLogin/shopping/shoppingController.jpf in the address bar of your browser.

    If WebLogic Server is running in the Workshop domain on your machine, you may click here to run the Shopping Cart sample.

  3. Enter the username/password pair "weblogic"/"weblogic" to login.

Related Topics

Form-based Login Sample

Role-based Security Sample