I want to show some images, if I have only one application, the image could be 
showed in the web paged as expected:

```scheme

#lang racket

(require web-server/servlet)
(require web-server/servlet-env)

(define (my-app req)
  (response/xexpr
   '(html (head (title "OK"))
          (body (h1 "ok now")
                (img ((src "/large.png")))))))

(serve/servlet my-app
               #:launch-browser? #t
               #:quit? #f
               #:listen-ip #f
               #:port 8080
               #:extra-files-paths (list (build-path (current-directory) 
"htdocs"))
               #:servlet-path "/")

```

However, if I add another application, the image now could not be shown by 
visiting:
> http://localhost:8080/myapp


```scheme

#lang racket

(require web-server/servlet)
(require web-server/servlet-env)

(define (start request)
  (dispatch request))

(define-values (dispatch url)
  (dispatch-rules
   (("") list-domains)
   (("myapp") my-app)
   (else list-domains)))

(define (my-app req)
  (response/xexpr
   '(html (head (title "OK"))
          (body (h1 "ok now")
                (img ((src "/large.png")))))))

(define (list-domains req)
  (response/xexpr
   '(html (head (title "hi"))
          (body (p "continue...")))))

(serve/servlet start
               #:launch-browser? #t
               #:quit? #f
               #:listen-ip #f
               #:port 8080
               #:servlet-path "/"               
               #:extra-files-paths (list (build-path (current-directory) 
"htdocs"))
               #:servlet-regexp #rx"")

```

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to