[plt-scheme] Displaying a picture while using instaweb

From: geb a (geb_a at yahoo.com)
Date: Wed Dec 10 12:30:44 EST 2008

Does the servlet need to be stored in the web-server servlets directory in order to find an image and display it?  I have the following but when viewed in a browser the images are not found. 

Thanks for your help!

Dan


(define buttons
  '(("contactus.htm" "sm-fitness-training-but.jpg") 
    ("specials.htm" "fitness-training-shdlrsm.jpg" )
    ("testimonials.htm" "sm-fitness-training-by-jon-.jpg")
    ("philosophy.htm" "fitness-training-situpsm.jpg")
    ("programs.htm" "sm-fitness-training-bal.jpg")
    ("questions.htm" "sm-fitness-training-arm.jpg")
    ("aboutus.htm" "fitness-training-curlsm.jpg")))

(define (create-button info)
  `(td ()
       (div ((align "center"))
            (a((href ,(car info)))
              (img((border "0")
                   (height "72")
                   (width "105")
                   (src ,(cadr info))))))))

(create-button '("contactus.htm" "sm-fitness-training-but.jpg") )

(define (start request)
  `(html
    (head 
     (title "Welcome to the Official Fitness On The Run Fitness Training By: Jon Ham Website")
     ,meta-statement)
    (body
     (table ((width "760") 
             (border "0") 
             (align "center")
             (cellpadding "0")
             (cellspacing "0"))
            (tr  ,@(map create-button buttons))))))






--- On Wed, 12/10/08, plt-scheme-request at list.cs.brown.edu <plt-scheme-request at list.cs.brown.edu> wrote:

> From: plt-scheme-request at list.cs.brown.edu <plt-scheme-request at list.cs.brown.edu>
> Subject: plt-scheme Digest, Vol 40, Issue 29
> To: plt-scheme at list.cs.brown.edu
> Date: Wednesday, December 10, 2008, 9:00 AM
> Send plt-scheme mailing list submissions to
> 	plt-scheme at list.cs.brown.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> or, via email, send a message with subject or body
> 'help' to
> 	plt-scheme-request at list.cs.brown.edu
> 
> You can reach the person managing the list at
> 	plt-scheme-owner at list.cs.brown.edu
> 
> When replying, please edit your Subject line so it is more
> specific
> than "Re: Contents of plt-scheme digest..."
> 
> 
> [Please handle PLT Scheme list administrative tasks through
> the Web:
>    http://list.cs.brown.edu/mailman/listinfo/plt-scheme]
> 
> 
> Today's Topics:
> 
>    1. Re: reliable exit handlers for foreign functions
>       (Dimitris Vyzovitis)
>    2. Re: Complex Application With Database (Noel Welsh)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 9 Dec 2008 19:32:40 -0500 (EST)
> From: Dimitris Vyzovitis <vyzo at media.mit.edu>
> Subject: Re: [plt-scheme] reliable exit handlers for
> foreign functions
> To: Eli Barzilay <eli at barzilay.org>
> Cc: Matthew Flatt <mflatt at cs.utah.edu>,
> plt-scheme at list.cs.brown.edu
> Message-ID:
> <Pine.LNX.4.64.0812091922520.18490 at ml.media.mit.edu>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> 
> On Tue, 9 Dec 2008, Eli Barzilay wrote:
> 
> > In any case, I couldn't find it either on my
> system -- the only
> > place that had it is
> /usr/lib64/dietlibc/lib-x86_64/libc.so.
> 
> There is another insight here: atexits tend to be dangerous
> with dsos 
> (ouch when the atexit handler has been unloaded because of
> a dlclose).
> ELF provides _init/_fini sections, but of course such
> functionality is 
> infeasible for ffi.
> 
> So, just trying find a proper solution:
> 
> Eli, is it possible to add a facility for exit/unload
> handlers associated 
> with ffi-libs?
> 
> Something like
> (register-unload-handler ffi-lib thunk)
> to be called right before the dlclose (or when scheme
> exits, in the case 
> there is no dlclose at all)
> 
> -- vyzo
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 10 Dec 2008 08:03:19 +0000
> From: "Noel Welsh" <noelwelsh at gmail.com>
> Subject: Re: [plt-scheme] Complex Application With Database
> To: "Rohan Golwala" <ce.rohan at gmail.com>
> Cc: plt-scheme at list.cs.brown.edu
> Message-ID:
> 	<c2b7813c0812100003s4c6976e5k8f42398325ae944b at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Your question is so general it is very difficult to answer.
> 
> If you want something complicated involving SQL you could
> look at the
> Sudoku solvers that have been written in SQL.  Search for
> them -- you
> will find many links.
> 
> N.
> 
> On Tue, Dec 9, 2008 at 11:43 PM, Rohan Golwala
> <ce.rohan at gmail.com> wrote:
> > Hi,
> >
> > I am working on a project using Scheme language and
> PostGRESQL. Can anyone
> > suggest some higher or complex operations to be
> performed using SQL
> > database...? Can anyone help me with any topic or idea
> and provide an
> > understandingor a document on it to understand it...?
> >
> > Thanks,
> >
> > --
> > Rohan.
> 
> 
> End of plt-scheme Digest, Vol 40, Issue 29
> ******************************************


      


Posted on the users mailing list.