[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plt-scheme] Strange problem with servlets
Hi, I am trying to write scheme-servlets but seems to face a strange
problem;
1. Open a NEW Explorer window and address the servlet.
2. After filling in the form, Explorer waits forever or until I stop and
submit the same form again.
Some remarks;
- If I press refresh before filling out the form, the problem disappears and
the servlet continues.
- The problem does not occur on Opera web-browsers.
- It works after pressing stop and pressing submit button again.
- I am using Explorer 6.0 & running the servlets on Windows XP (to be ported
to a Linux-server).
- It works if I change the last line in my program to:
,(let ((a (request)) (b (request))) "Not here")))))))
(in the this case I request the same form twice)
Seems to be a small problem with the HTTP-header part?
In case I am doing something wrong, I would be very glad for some
enlightenment!
Best Regards
Petter Egesund
Norway
Here is a version of the program, wich is a strip-down of the enclosed
add2.ss-example.
---------------------
(require (lib "unitsig.ss")
(lib "servlet-sig.ss" "web-server")
(lib "servlet-helpers.ss" "web-server")
(lib "date.ss"))
(unit/sig () (import servlet^)
; request-number : str -> num
(define (request)
(request-bindings (send/suspend (build-request-page))))
; build-request-page : str -> str -> response
(define (build-request-page)
(lambda (k-url) (display k-url)
`(html (head (title "Enter a Number to Add Me"))
(body ([bgcolor "white"])
(form ([action ,k-url] [method "post"])
"Enter the number to add: "
(input ([type "radio"] [name "q1"] [value "A"]))
(input ([type "radio"] [name "q1"] [value "B"]))
(input ([type "text"] [name "number"] [value ""]))
(p "small inline 24")
(input ([type "submit"] [name "enter"] [value
"Enter"])))))))
(send/suspend
(lambda (k-url)
`(html (head (title "Sum"))
(body ([bgcolor "white"])
(p "The sum is "
,(let ((a (request)) ) "Not here")))))))
-----------------------
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/