forward

You typically use the EGL forward statement to transfer control to a Web page. You can do this in different ways, depending on the type of UI technology you are using. At the core level, you can pass control to a URL; for other options, see the related references at the end of this topic.

The statement performs the following actions:
  1. Commits recoverable resources, closes files, and releases locks
  2. Forwards control
  3. Ends the handler that runs the forward statement

Syntax

Syntax diagram for the forward statement
argument
A variable that is passed to the page at the specified URL. The names of an argument and its corresponding parameter must be the same in all cases (the name is used as a key in storing and retrieving the parameter value on the Web application server). You cannot pass literals.
Instead of passing an argument, you can alternately use the setRequestAttr() or setSessionAttr() functions from j2eeLib.
A character variable is passed as a Java™ String object; a record is passed as a bean.
targetType
You can specify one of the following destinations:
  • label, where the UI technology supports this keyword; see the related references at the end of this topic.
  • URL, to forward to a Web page. This keyword is available at the core level.
targetID
Specifies the URL of the page to forward to. If the URL is absolute (includes a domain name), EGL implements the forward statement as an HTTP redirect. If the URL is relative (on the same server), EGL implements the forward statement as an HTTP dispatch unless the expression includes the -redirect keyword, as in the following example:

Feedback