How to get information about the end user in a WebClient connection. |
When you run your application in a WebClient environment, the Application Server has very little information about the user at the other end of the browser. As far as it knows, the WebClient server is the client.
However, you can have the WebClient send information about the end user and the end user's computer by passing some pre-defined arguments to your program after the program name in the "Program name and arguments" field.
The three variables that return information about the client are;
-
${clientId}, which returns information including a unique browser identifier, so you can tell if the user has started a second instance of the program a different browser,
-
${clientIp}, the IP address of the browser that started the application,
-
${clientLocale}, returning the country location.
If you wanted to use each of these variables with a program called "WC_CLIENT_VAR", you would enter the following in the 'Program name and arguments' field:
Your program will chain these values and catch them in the linkage section like this:
PROCEDURE DIVISION chaining clientId
clientIp
clientLocale
.
The client information passed in "clientID" is a string of four values, delimited by "_"; The webapp name, the user name, a browser ID, and the time in milliseconds.
You'll need to unstring it into 4 fields.
unstring clientId delimited by "_"
into app
user
browserId
currentTimeMillis.
You can use the attached program as a reference to get the information you need from the WebClient's user. Here's a sample output for the program:
There are many other variables you can pass to your program, including every operating system variable (ex: ${path}), two WebClient-specific variables, and your own custom variables.
These arguments are listed in the WebClient documentation.
|
Authored
by: Veryant Support
This question has been viewed 892 times so far.
|
Click
Here to View all the questions in Web Enablement
category. |
File Attachments |
|
|
User Comments |
|
|
There are no user comments for this question. Be the first to post a comment. Click Here |
Related Questions
|
There are no other questions related to this question. |