别了,EJB 2.x- -| 回首页 | 2005年索引 | - -[zz]Continuation-based web programming

Servlet with Scheme: One Input Form- -

                                      

(require (lib "unitsig.ss")
         (lib "servlet-sig.ss" "web-server"))

;; return value of a servlet unig/sig will be displayed as a web page
(unit/sig () (import servlet^)
  
  (define (get-name)
    (extract-binding/single
      'name
      (request-bindings (send/suspend (input-name-page)))))

  (define (input-name-page)
    (lambda (k-url)
      `(html (head (title "Enter Your Name"))
             (body ([bgcolor "white"])
                   (form ([action ,k-url] [method "post"])
                         "Enter Your Name Please: "
                         (input ([type "text"] [name "name"] [value ""]))
                         (input ([type "submit"] [name "enter"] [value "Enter"])))))))

  ;; When generating output x-expression,
  ;; the function (get-name) is called,
  ;; which invoke (input-name-page) to generate a page with input form.
  ;; This should surprise you.
  ;; If not, please wait for my next entry :>
  `(html (head (title ,the-text))
         (body ([bgcolor "white"])
               (p, "Hello, ", (get-name)))))

- 作者: 透明 2005年08月9日, 星期二 13:38

Trackback

你可以使用这个链接引用该篇日志 http://publishblog.blogdriver.com/blog/tb.b?diaryID=882434

博客手拉手

回复

- 评论人:rxxfhieq

Thu May 17 01:26:47 CST 2007  作者邮箱  作者Blog

epxwxwmedf[url=http://zvore.yi.org/82177478.html]brazilian pussy[/url][url=http://xenggi.66ghz.com/46330167.html]gun games[/url][url=http://wxaxw.22web.net/34298878.html]tatoo designs[/url][url=http://www32.websamba.com/viora/94041272.html]model com[/url][url=http://uenvc.22web.net/16709694.html]football games[/url][url=http://ninfrb.yi.org/20352297.html]blades glory cam xvid mvs[/url]

评论内容: