[racket] Writing a file from a web servlet

From: Curtis Dutton (curtdutt at gmail.com)
Date: Wed Jun 9 11:36:56 EDT 2010

I have a very simple web servlet application that tries to write data to a
file as a sort of miniature database.

Here is the code that writes the file.

(define (save-costs costs)
  (with-output-to-file
      file-name
      (lambda ()
        (write (serialize costs)))
    #:exists 'truncate
    #:mode 'text))


In normal scheme this code works fine and creates the file "costs.dat" and
everything is merry.

Inside the web server it does not create the file anywhere or update it
thought the code executes without error.

The web server is able to read the file on startup, just not write it.

What am I doing wrong here?


Thanks,
     Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100609/9273389e/attachment.html>

Posted on the users mailing list.