EGL library j2eeLib

The EGL system library j2eeLib provides functions for EGL programs that run in a servlet Web environment. In this environment, you launch your application from a browser, but the majority of the processing takes place within a servlet on an application server like IBM® WebSphere® Application Server, version 6.1 or Apache Tomcat.

The servlet maintains application storage on the server that you can use. You can choose one of three different scopes when you place a value in this storage area:
request
Request scope lasts only as long as a single request from your client. That request, however, might be passed from one program to another in the servlet.
session
Session scope lasts as long as you remain connected to the server. Once you break that connection, any values you stored in session scope are lost.
application
Application scope persists through multiple connection sessions, and only ends when you terminate the application.

In practice, these functions are only useful for JSF handlers.

The next table lists the system functions in the library j2eeLib.

Table 1. j2eeLib functions
Function Description
clearApplicationAttr (key) Removes the value that is associated with the specified key in application scope storage.
clearEGLSessionAttrs() Removes all values associated with all keys placed in session scope storage.
clearRequestAttr (key) Removes the value that is associated with the specified key in request scope storage.
clearSessionAttr (key) Removes the value that is associated with the specified key in session scope storage.
value = getApplicationAttr (key) Uses a specified key to retrieve a value from application scope storage.
getAuthenticationType() Returns the J2EE authentication method in use for the current Web application.
getRemoteUser() Returns the user's login ID.
getRequestAttr (key, value)

value = getRequestAttr (key)

Uses a specified key to retrieve a value from request scope storage.
getSessionAttr (key, value)

value = getSessionAttr (key)

Uses a specified key to retrieve a value from session scope storage.
value = getQueryParameter (key) Uses a specified key to retrieve a value from an AJAX request or other query.
isUserInRole(roleName) Indicates whether the user is included in a specified role.
setApplicationAttr (key, value) Uses the specified key to place the specified value in application scope storage.
setRequestAttr (key, value) Uses the specified key to place the specified value in request scope storage.
setSessionAttr (key, value) Uses the specified key to place the specified value in session scope storage

Compatibility

Table 2. Compatibility considerations for j2eeLib
Platform Issue
COBOL generation None of the j2eeLib functions are supported.

Feedback