Define a serie of local variables through the parameters received in the request which execute the XSQL Script.

1 http.request.setVariablesFromParameters

<http.request.setVariablesFromParameters prefix='prefix'/>

Exceptions

script is not in http request mode

It is called from the command line because the request HTTP servlet does not exist.

Example

Obtain the value of the request parameters HTTP servlet.
Suposing that the request contains the following parameters:

Parameter Value
employee.firstname John
employee.lastname Smith
employee.birthdate 1978-09-14
Copy
<xsql-script name='http_connection_setVariablesFromParameters'>
    <body>
        <http.request.setVariablesFromParameters prefix='r_' />
        
        <println>First Name: <r_firstname /></println>
        <println>Last Name: <r_lastname /></println>
        <println>Birth Date: <r_birthdate /></println>
    </body>
</xsql-script>

Remarks

Notice that those request params with name as tabname.colname, and the corresponding tabname and colname actually exists in the database, the defined variables will be of the type defined by the column in database. Otherwise, the defined variables will be of type String.