1 Running the Web Server
2 Scheme Servlets
3 Web Language Servlets
4 Configuration
5 Dispatchers
6 Web Config Unit
7 Web Server Unit
8 Continuation Managers
9 Internal
10 Troubleshooting
11 Acknowledgements
Index
On this page:
make-web-parameter
web-parameter?
web-parameterize
Version: 4.0.2

 

3.8 Web Parameters

 (require web-server/lang/web-param)

As mentioned earlier, it is not easy to use parameterize in the Web Language. "lang/web-param.ss" provides (roughly) the same functionality in a way that is serializable. Like other serializable things in the Web Language, they are sensitive to source code modification.

(make-web-parameter default)

Expands to the definition of a web-parameter with default as the default value. A web-parameter is a procedure that, when called with zero arguments, returns default or the last value web-parameterized in the dynamic context of the call.

(web-parameter? v)  boolean?

  v : any/c

Checks if v appears to be a web-parameter.

(web-parameterize ([web-parameter-expr value-expr] ...) expr ...)

Runs (begin expr ...) such that the web-parameters that the web-parameter-exprs evaluate to are bound to the value-exprs. From the perspective of the value-exprs, this is like let.