R.rsp (version 0.30.0)

sourceRsp: Processes an RSP file by translating it to an R servlet, which is then sourced

Description

Processes an RSP file by translating it to an R servlet, which is then sourced.

Usage

"sourceRsp"(..., response=FileRspResponse(file = stdout()), request=NULL, envir=parent.frame(), verbose=FALSE)

Arguments

...
Arguments passed to translateRspV1(), e.g. file and path.
response
An RspResponse object to which output is passed. This object can be accessed by the RSP code.
request
An optional HttpRequest object describing the request. If NULL, one is created refering to the request RSP file. This object can be accessed by the RSP code.
envir
An environment to be the working environment of the servlet, i.e. where RSP variables and objects are stored.
verbose
Either a logical, a numeric, or a Verbose object specifying how much verbose/debug information is written to standard output. If a Verbose object, how detailed the information is is specified by the threshold level of the object. If a numeric, the value is used to set the threshold of a new Verbose object. If TRUE, the threshold is set to -1 (minimal). If FALSE, no output is written.

Value

Returns what the R servlet code returns.

Details

When "sourcing" an RSP file, the RSP code is first translated to an R servlet, which is plain R source code. Then the servlet is sourced, and it in turns outputs the final response, e.g. an HTML document.

See Also

translateRspV1(). sourceAllRsp().