You need to stop using `web-server/insta` so you can customize more.
Then, you need to intercept ALL requests with your servlet. Then, your
servlet just needs to call (next-dispatcher) and the static file
handler will kick in, because it comes after servlets.

Jay

On Wed, Jan 2, 2019 at 7:08 PM Stephen De Gabrielle
<[email protected]> wrote:
>
> Hi,
>
> I'm fooling around with #lang web-server/insta, and I can serve .html files 
> by setting (static-files-path page-root), but I'd like to trigger my servlet 
> if there is a '?action=edit' parameter set.
>
> e.g
> https://localhost/start.html just serves the file (I can do this!)
> https://localhost/start.html?action=edit  calls my servlet (I can't work out 
> how to do this :( )
>
> (There is a lot of documentation but I'm a beginner with webdev so don't know 
> where to look)
>
> Kind regards
>
> Stephen
>
> PS the project is a scribble based wiki. If you create a new page you enter 
> raw scribble/manual in a form (my servlet) and it gets saved in a folder and 
> transformed into html that is served directly by (static-files-path 
> page-root), the conversion from raw scribble goes like this:
> (require raco/all-tools)
> (define raco-scribble-spec (hash-ref (all-tools) "scribble"))
> ;;scribble-to-html : source target body
> ;; generate html file from scribble file
> (define (scribble-to-html source target) ;-> list of strings
>   (parameterize ([current-command-line-arguments (vector "--html" source)]
>                  [current-directory target])
>     (dynamic-require (cadr raco-scribble-spec) #f)))
>
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.



-- 
-=[     Jay McCarthy               http://jeapostrophe.github.io    ]=-
-=[ Associate Professor        PLT @ CS @ UMass Lowell     ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to