By using the session management function, a Web application that performs business extending over multiple requests from a specific client (WWW Browser) can be created.
Function | Subroutine name | Usage |
---|---|---|
Session management | COBW3_START_SESSION | Session start |
COBW3_END_SESSION | Session end | |
COBW3_SET_SESSION_DATA | Registration of session data | |
COBW3_GET_SESSION_DATA | Acquisition of session data | |
COBW3_ALTER_SESSION_TIMEOUT | Change of the session timeout period | |
COBW3_GET_SESSION_INFO | Acquisition of current session information |
The session management function cannot be used in the COBOL CGI subroutines.
By opening a session using the session management function, connection to a specific client (WWW Browser) can be maintained. Since, within the same session, data entered in the previous page can be inherited by the next page using the session data, business programs in which multiple screens (pages) appear can easily be created.
If business is interrupted because the operator leaves his or her seat too long during screen operation or the WWW Browser is closed while a session is in progress, a timeout of the session occurs.
Timeout means the time elapsed within the same session between the instant when a response is returned from the Web application to the WWW Browser and the instant when the next request is issued by the WWW Browser reaches the specified time interval.
When a timeout occurs, the session end is forced by the session management. Thus, if a timeout occurs, resources of Web applications may remain in a state in which the session is suspended. The session management provides, as a countermeasure to handle such conditions, the registration features of timeout processing.
Note
If a Web application using sessions is activated doubly by double-clicking, for example, the SUBMIT button (button specifying "SUBMIT" as the TYPE attribute of the INPUT tag), the operation of the Web application is undefined. Thus, it is necessary to inhibit double activation using, for example, JavaScript on the WWW Browser. For general precautions to be taken when operating the WWW Browser, see "NetCOBOL Web Guide".