Howdy,<br><br>I was working on some code which produced a bunch of output. To make it easier to read, I decided to generate HTML and look at in the browser. And as long as I was generating HTML, I figured what the heck, I should turn my code into my very first servlet.<br>
<br>So I hastily through together the following code:<br><br>;; --+--+--<br>(define (foo-servlet request)<br> `(html<br> (head<br> (title "Foo App"))<br> (body<br> (form ((method "POST"))<br>
(input ((type "text") (name "q")))<br> (input ((type "submit") (value "Go!"))))<br> ,(if (exists-binding? 'q (request-bindings request))<br> (let ([results (do-foo (extract-binding/single 'q (request-bindings request)))])<br>
`(ul<br> ,@(for/list ([r results])<br> `(li (a ((href ,(result-url r))) ,(result-value r))))))<br> "-- Enter a Foo arg --"))))<br><br>(serve/servlet foo-servlet<br>
#:port 8002 <br> #:servlet-path "/")<br>;; --+--+--<br><br clear="all">And holy smokes, it worked! In no time I was interactively testing `foo'. And when foo failed, I got a big 'ol exception stacktrace. Again, all good.<br>
<br>But, for some arguments that I pass to `foo' the browser churns and then ends at a blank screen. No exception is thrown, no error message is given.<br><br>If I had to wager a guess, I'd say that my call to (do-foo ...) was taking to long.<br>
<br>So, my questions are:<br><br>1) Any suggestions for pinpointing an issue where the response is just a blank page (with not HTML) returned?<br><br>2) What's the best way to change the connection timeout? I've tried adjust-timeout! , but that doesn't change anything and I'm not convinced it's changing the timeout I want it to change. I see adjust-connection-timeout! but I'm not sure how I would use this with serve/servlet.<br>
<br>Thanks in advance,,<br>Ben<br><br><br>-- <br>Have an idea for software? I can make it happen - <a href="http://www.ideas2executables.com">http://www.ideas2executables.com</a><br>My Blog: <a href="http://benjisimon.blogspot.com">http://benjisimon.blogspot.com</a><br>