Struts Interoperation Sample

Demonstrates the interoperability between page flows and Struts. The strutsInteropController page flow instantiates a form bean, JpfFormBean, then passes this shared form to a Struts module named strutsModule. The Struts module alters the contents of the form and passes it back to the page flow. Because page flow forms derive from Struts forms, this sharing of the form bean is possible.

Concepts Demonstrated by this Sample

Location of Sample Files

In the SamplesApp, this sample's files are located in several directories:

Location
Contents Include...
SamplesApp/WebApp/struts/strutsInterop The page flow directory, which includes JSP pages that are part of the page flow, and the shared form bean
SamplesApp/WebApp/struts/strutsModule A JSP that is part of the Struts module
SamplesApp/WebApp/WEB-INF/src/strutsModule Two Struts actions classes
SamplesApp/WebApp/WEB-INF The strutsModule XML, and the project's web.xml where we registered the Struts module

For details about these files, see Interoperating With Struts and Page Flows.

On the local file system, the sample directories listed above are under the WebApp project directory that starts at:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebApp\...

How to Run the Sample

  1. Start WebLogic Server in the Workshop domain.
  2. Launch the page flow either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebApp/struts/strutsInterop/strutsInteropController.jpf in the address bar of your browser. If WebLogic Server is running in the Workshop domain on this machine, you may click here to run the sample.

Related Topics

Interoperating With Struts and Page Flows

Merging Struts Artifacts Into Page Flows

@jpf:controller Annotation

Getting Started with Page Flows

Tutorial: Page Flow