processRequest

processRequest(httpString:  String;
               queryString: String) updating;

The processRequest method of the WebSession class, which is executed when a request is received from the Web, can be reimplemented in your user session class. The appropriate form is then updated with the information received from the incoming string and a reply is sent back to the Web browser after all processing is complete.

The httpString parameter is the string returned from a Web browser request as a result of a POST action on a Web page. When there is no POST action, the string that is returned is the same as the value returned by the queryString parameter.

The queryString parameter is the string returned as a result of the selection of a hyperlink or the entry of a Uniform Resource Locator (URL) on the address line of the Web browser.

You can reimplement this method in your applications. The following example shows the use of this method to extract information from the string to perform some prior processing.

processRequest(httpString, queryString: String) updating;
vars
    userName: String;
begin
    //look for a field name called userName
    userName := currentSession.getHttpParam('userName');
    if userName <> null then
        // do some processing
    endif;
    //now call the default implementation
    inheritMethod(httpString, queryString);
end;

If the JADE implementation of this method is not called (by using the inheritMethod instruction), it is your responsibility to do any processing that is necessary and to send a reply back to the browser. For more details, see the WebSession class reply method.

JADE expects the incoming httpString parameter value to be in a certain format. If the string that is passed to the inheritMethod call violates this assumption, the results may be unpredictable; that is, an exception may be raised or information may be lost or updated incorrectly.