example/servlet.ss
#lang scheme/base
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SHP: Hypertext Processor
;;
;; a PHP like web framework for PLT Scheme
;;
;; Bonzai Lab, LLC.  All rights reserved.
;;
;; Licensed under LGPL.
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; servlet.ss
;; a sample servlet binding of SHP
(require (only-in web-server/servlet current-servlet-continuation-expiration-handler)
         web-server/managers/lru
         web-server/http/request-structs
         web-server/dispatchers/dispatch
         net/url
         mzlib/etc
         "../main.ss"
         )

(provide (all-defined-out))

(define interface-version 'v2)

(define manager
  (create-LRU-manager current-servlet-continuation-expiration-handler
                      60
                      3600
                      (lambda () #t)
                      #:initial-count 1 
                      #:inform-p (lambda _ (void))))


(define start
  (make-shp-handler (build-path (this-expression-source-directory) "shp") 
                    #:topfilter "topfilter"
                    #:chrome "chrome"))