► |  | Web Server: PLT HTTP Server

1 | Running the Web Server
2 | Writing Servlets
3 | Extending the Web Server
4 | Troubleshooting and Tips
5 | Acknowledgements
| Index

▼ | 2 | Writing Servlets

2.1 | Defining a Servlet
2.2 | APIs
2.3 | Common Contracts
2.4 | HTTP
2.5 | Web Interaction
2.6 | Stateless Web Interaction
2.7 | Web Cells
2.8 | File Boxes
2.9 | Stateless Web Parameters
2.10 | Formlets
2.11 | Templates
2.12 | Continuation Managers

On this page:

make-web-parameter
web-parameter?
web-parameterize

Version: 4.1.4
top← prev up next →

#### 2.9`` Stateless Web Parameters

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

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.

top← prev up next →