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:
send-url
on-web
Version: 4.0.2

 

2.11 Environment

 (require web-server/servlet-env)

The Web Server provides a means of running Scheme servlets from within DrScheme, or any other REPL.

"servlet-env.ss" provides the servlet API from "servlet.ss" as well as the following:

send-url : (parameter/c ([url string?] [separate-window? boolean?] . -> . void))

Should open url. In another window if separate-window? is true. By default this is from net/sendurl.

(on-web servlet-expr)

(on-web port servlet-expr)

The first form expands to (on-web 8000 servlet-expr).

Constructs a small servlet, where the body of the start procedure is servlet-expr, runs the Web Server on port port, and calls send-url with a URL for the constructed servlet. The call blocks until the servlet finishes its computation, i.e. servlet-expr is evaluated, and returns its result. servlet-expr may use the entire Scheme servlet API.