Processing Requests and Responses for Static Server Pages

Static Server Page (USP) components generate a full-page HTML response to all requests from a web client. The request is loaded and executed by the USP on the Uniface Server, and the generated response is sent back to the client.

The webget statement handles the input from the client, and webgen generates the output.

The following illustration shows how the Uniface Server processes client requests for a USP and generates the response. The communication flow from the client to Uniface Server has been simplified to omit the Web Request Dispatcher (WRD) and Uniface Router. For more information, see How a Uniface Web Application Works.

Processing HTTP requests and responses for static server pages

Uniface Server Processing in USPs

  1. The client initiates an HTTP request for a Uniface component by means of a URL, for example, website/wrd/MYUSP.exec.
  2. The request is sent to the Uniface Server.
  3. The Uniface Server creates an instance of the requested component and activates the exec operation. The information in the request is made available to the component in $webinfo("input"). The webget statement loads the data from $webinfo("input"), then reconnects with the data/database to check for data concurrency issues. It then sets the active path to the current occurrence before firing the detail or error trigger, if necessary.
  4. The webgen statement generates a response and puts it into the $webinfo("output") channel.
  5. The full-page HTML response is sent back to the client browser.

Note: Depending on the request, data may be stored in the database. This should be done after webget and before webgen.

Related Topics