You are using Racket 5.1, but you are reading the documentation from 4.2.1.<div><br></div><div>If you read the documentation for the version you are using, by going to the Help Desk link, or looking at this closely related on online:</div>
<div><br></div><div><a href="http://docs.racket-lang.org/continue/index.html">http://docs.racket-lang.org/continue/index.html</a></div><div><br></div><div>You'll see that the example is different now:</div><div><br></div>
<div><div>#lang web-server/insta</div><div>(define (start request)</div><div> (response/xexpr</div><div> '(html</div><div> (head (title "My Blog"))</div><div> (body (h1 "Under construction")))))</div>
</div><div><br></div><div><br></div><div>Jay<br><br><div class="gmail_quote">On Sat, Dec 3, 2011 at 12:10 PM, lothar atheling <span dir="ltr"><<a href="mailto:lothar_@warpmail.net">lothar_@warpmail.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">re: <a href="http://download.plt-scheme.org/doc/4.2.1/html/continue/index.html" target="_blank">http://download.plt-scheme.org/doc/4.2.1/html/continue/index.html</a><br>
<br>
hello,<br>
<br>
i am having trouble getting to run the 1st example in<br>
tutorial "Continue: Web Applications in PLT Scheme", here:<br>
<br>
#lang web-server/insta<br>
(define (start request)<br>
'(html<br>
(head (title "My Blog"))<br>
(body (h1 "Under construction"))))<br>
<br>
<br>
what is returned is following web page at<br>
<a href="http://localhost:2906/servlets/standalone.rkt" target="_blank">http://localhost:2906/servlets/standalone.rkt</a><br>
<br>
Exception<br>
The application raised an exception with the message:<br>
<br>
self-contract violation: expected <can-be-response?>, given: '(html<br>
(head (title "My Blog")) (body (h1 "Under construction")))<br>
contract on start from you, blaming you<br>
contract:<br>
(-> request? can-be-response?)<br>
<br>
Stack trace:<br>
<br>
raise-blame-error at:<br>
line 58, column 0, in file H:\Program<br>
Files\Racket\collects\racket\contract\private\blame.rkt<br>
<unknown procedure> at:<br>
line 58, column 2, in file H:\Program<br>
Files\Racket\collects\web-server\dispatchers\dispatch-servlets.rkt<br>
select-handler/no-breaks at:<br>
line 164, column 2, in file H:\Program<br>
Files\Racket\collects\racket\private\more-scheme.rkt<br>
connection-loop at:<br>
line 74, column 2, in file H:\Program<br>
Files\Racket\collects\web-server\private\dispatch-server-unit.rkt<br>
<br>
<br>
i am using racket 5.1<br>
<font color="#888888"><br>
<br>
--<br>
<a href="http://www.fastmail.fm" target="_blank">http://www.fastmail.fm</a> - mmm... Fastmail...<br>
<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jay McCarthy <<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>><br>Assistant Professor / Brigham Young University<br><a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>"The glory of God is Intelligence" - D&C 93<br>
</div>