► |  | 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

► | 3 | Extending the Web Server

3.1 | Configuration
3.2 | Setting Up Servlets
3.3 | Dispatchers
3.4 | Web Config Unit
3.5 | Web Server Unit
3.6 | Internal

▼ | 3.4 | Web Config Unit

3.4.1 | Configuration Signature
3.4.2 | Configuration Units

On this page:

configuration-table->web-config@
configuration-table-sexpr->web-config@

Version: 4.1.4
top← prev up next →

##### 3.4.2`` Configuration Units

(require web-server/web-config-unit)

(configuration-table->web-config@ |
|  | path |
| [ | #:port port |
|  | #:listen-ip listen-ip |
|  | #:make-servlet-namespace make-servlet-namespace]) |

→ (unit? web-config^)
path : path-string?
port : (or/c false/c port-number?) = #f
listen-ip : (or/c false/c string?) = #f

| make-servlet-namespace |  | : |  | make-servlet-namespace/c
|  |  | = |  | (make-make-servlet-namespace)

Reads the S-expression at path and calls configuration-table-sexpr->web-config@ appropriately.

(configuration-table-sexpr->web-config@ |
|  | sexpr |
| [ | #:web-server-root web-server-root |
|  | #:port port |
|  | #:listen-ip listen-ip |
|  | #:make-servlet-namespace make-servlet-namespace]) |

→ (unit? web-config^)
sexpr : list?

| web-server-root |  | : |  | path-string?
|  |  | = |  | (directory-part default-configuration-table-path)

port : (or/c false/c port-number?) = #f
listen-ip : (or/c false/c string?) = #f

| make-servlet-namespace |  | : |  | make-servlet-namespace/c
|  |  | = |  | (make-make-servlet-namespace)

Parses sexpr as a configuration-table and constructs a web-config^ unit.

top← prev up next →