EGL Reference Guide for iSeries

Run-time scenario

This section gives a technical overview of the run-time interaction of user and Web application server.

When the user invokes a JSP that is supported by a page handler, the following steps occur:

  1. The Web application server initializes the environment--
    1. Constructs a session object to retain data that the user-accessed applications need across multiple interactions
    2. Constructs a request object to retain data on the user's current interaction
    3. Invokes the JSP
  2. The JSP processes a series of JSF tags to construct a Web page--
    1. Creates an instance of the page handler, causes the onPageLoad function (if any) to be invoked with user-specified arguments, and places the page handler into the request object
    2. Accesses data stored in the request and session objects, for inclusion in the Web page

    Note:
    The pageHandler part has a property called OnPageLoad, which identifies the page-handler function that is invoked at JSP startup. The function automatically retrieves any user-supplied arguments that were passed to it; can call other code; and can place additional data in the request or session object of the Web application server; but the function can neither forward control to another page nor cause an error message to be displayed when the page is first presented to the user.
  3. The JSP submits the Web page to the user, and the Web application server destroys the response object, leaving the session object and the JSP.

If the user supplies data in the on-screen fields associated with an HTML <FORM> tag and submits the form, the following steps occur:

  1. The Web application server re-initializes the environment--
    1. Constructs a request object
    2. Places the received data for the submitted form into the page bean, for validation
    3. Re-invokes the JSP
  2. The JSP processes a series of JSF tags to store the received data in the page bean.
  3. The run-time page handler validates data:
    1. Does relatively elementary edits (such as minimum input length), as specified in the pageHandler data declarations
    2. Invokes any item-specific validation functions, as specified in the pageHandler data declarations
    3. Invokes a pageHandler validator function, as is needed if you wish to validate one field at least partially on the basis of the content of another field

    (For details on validation, see the previous section.)

  4. If an error occurs, the EGL run time places errors on a JSF queue, and the JSP re-displays the Web page with embedded messages. If no error occurs, however, the result is as follows:
    1. Data stored in the page bean is written to the record bean
    2. Subsequent processing is determined by an event handler, which is identified in the JSF tag that is associated with the user-clicked button or hyperlink.

The event handler may forward processing to a JSF label, which identifies a mapping in a run-time JSF-based configuration file. The mapping in turn identifies the object to invoke, whether a JSP (usually one associated with an EGL page handler) or a servlet.


Related concepts
References to parts
Web support


Related reference
Page Designer support for EGL
PageHandler part in EGL source format
Page item properties


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]