NJX:REQUESTCONTEXT

With the NJX:REQUESTCONTEXT control, the Natural application can access context information regarding the request:

  • Version information regarding the Natural for Ajax and Application Designer runtime.

  • Client information regarding the web client which is sending the request.

  • Server information regarding the web server which is executing the request.

  • Session information regarding the executed request.

The following topics are covered below:


General Information

The complete generated data structure is shown below, see Adapter Interface.

Version Information

The following fields provide version information:

Field Description
NJXVERSION The version number of the Natural for Ajax runtime which is executing the request.

Example: 8.3.3.1

CISVERSION The unique version number of the Application Designer component which is contained in the Natural for Ajax product. The value is read from the cisversion.xml file of the Natural for Ajax web application.

Example: CIS_V833_20140110_1943_NJX

Client Information

The following fields provide client information:

Field Description
CLIENTIPADDR Contains the value of getRemoteAddr() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRemoteAddr().

Example: 203.0.113.195

CLIENTHOSTNAME Contains the value of getRemoteHost() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRemoteHost().

Example: MYCLIENT

Note:
To see the real host name, you might have to change some configuration settings in your application server. For instance, Tomcat only shows the real host name if enableLookups is set to "true". For more information, see the corresponding documentation of your application server.

CLIENTPORT Contains the value of getRemotePort() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRemotePort().

Example: 65021

CLIENTLOCALE Contains a string representation (toString()) of the object returned by getLocale() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getLocale().

Example: en_US

CLIENTLOCALES Contains string representations (toString()) for the objects returned by getLocales() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getLocales().

Example: en_US en

Server Information

The following fields provide server information:

Field Description
SERVERHOSTNAME Contains the value of getServerName() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getServerName().

Example: MYHOST

SERVERPORT Contains the value of getServerPort() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getServerPort().

Example: 8080

Session Information

The following fields provide session information:

Field Description
HTTPSESSIONID Contains the value of getId() for the corresponding HTTP servlet request. See also https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSession.html#getId().

Example: 2DE02F9A39E3AAA498D964C5CB655FD3

CISSESSIONID This is a unique ID inside one Natural for Ajax web application. The ID contains the Application Designer session ID and subsession ID (see also the information on session IDs and on HTTP sessions in the Application Designer documentation - both topics are contained in Special Development Topics). Inside one Natural for Ajax web application, the value of CISSESSIONID uniquely identifies the corresponding Natural connection for this request.

Example: CASA2_184904389529_13894739310974170629549579553418

Adapter Interface

1 XCIREQUESTCONTEXT 
2 CISSESSIONID (A) DYNAMIC
2 CISVERSION (A) DYNAMIC
2 CLIENTHOSTNAME (A) DYNAMIC
2 CLIENTIPADDR (A) DYNAMIC
2 CLIENTLOCALE (A) DYNAMIC
2 CLIENTLOCALES (A/1:*) DYNAMIC
2 CLIENTPORT (I4)
2 HTTPSESSIONID (A) DYNAMIC
2 NJXVERSION (A) DYNAMIC
2 SERVERHOSTNAME (A) DYNAMIC
2 SERVERPORT (I4)