Re: [racket-users] triggering servlet on GET parameters

2019-01-13 Thread Stephen De Gabrielle
Apologies - I’ve changed it to public - > https://github.com/spdegabrielle/clash/blob/master/main.rkt On Mon, 14 Jan 2019 at 06:14, Jesse Alama wrote: > Hi Stephen, > > On 13 Jan 2019, at 13:21, Stephen De Gabrielle wrote: > > > On the bright side I have the basic thing working: > >

Re: [racket-users] triggering servlet on GET parameters

2019-01-13 Thread Stephen De Gabrielle
Thank you Jay, Matthew, Jesse & David, I'm still looking at the resources your referred me to - they are much appreciated. On the bright side I have the basic thing working: https://github.com/spdegabrielle/clash/blob/master/main.rkt I'm trying to build a very basic wiki using scribble as the

Re: [racket-users] triggering servlet on GET parameters

2019-01-07 Thread Jesse Alama
On 7 Jan 2019, at 0:16, Matthew Butterick wrote: Don't know if it would be an instructive example, but the Pollen project server [1], though not intended for production use, is a self-contained HTTP server that handles dynamic generation of HTML (it even works with Scribble files), which

Re: [racket-users] triggering servlet on GET parameters

2019-01-07 Thread Jay McCarthy
You can use web-server/servlet and you don't need to use web-server/dispatch if you don't want to. Your design seems good to me. On Sun, Jan 6, 2019 at 10:33 AM Stephen De Gabrielle wrote: > > Thank you Jay and David, > > Your suggestions were good, #:servlet-regexp #rx"" lets me capture the >

Re: [racket-users] triggering servlet on GET parameters

2019-01-06 Thread Matthew Butterick
Don't know if it would be an instructive example, but the Pollen project server [1], though not intended for production use, is a self-contained HTTP server that handles dynamic generation of HTML (it even works with Scribble files), which sounds similar to what you're trying to do. Jesse

Re: [racket-users] triggering servlet on GET parameters

2019-01-06 Thread Stephen De Gabrielle
Thank you Jay and David, Your suggestions were good, #:servlet-regexp #rx"" lets me capture the request for a page and server the original file, or the edit servlet: http://localhost:8000/mouse.html http://localhost:8000/mouse.html?action=edit I've been reading a little more and I think I've

Re: [racket-users] triggering servlet on GET parameters

2019-01-04 Thread Jesse Alama
Hi Stephen, On 3 Jan 2019, at 1:07, Stephen De Gabrielle wrote: 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

Re: [racket-users] triggering servlet on GET parameters

2019-01-03 Thread David Storrs
Stephen, you might also find this useful as a reference to crib from: http://matt.might.net/articles/low-level-web-in-racket/ On Thu, Jan 3, 2019 at 11:10 AM Jay McCarthy wrote: > Use normal racket/base and web-server/servlet-env ‘s serve/servlet > > On Thu, Jan 3, 2019 at 10:53 AM David Storrs

Re: [racket-users] triggering servlet on GET parameters

2019-01-03 Thread Jay McCarthy
Use normal racket/base and web-server/servlet-env ‘s serve/servlet On Thu, Jan 3, 2019 at 10:53 AM David Storrs wrote: > > > On Wed, Jan 2, 2019 at 7:12 PM Jay McCarthy > wrote: > >> You need to stop using `web-server/insta` > > > What would you recommend he use instead of web-server/insta? >

Re: [racket-users] triggering servlet on GET parameters

2019-01-03 Thread David Storrs
On Wed, Jan 2, 2019 at 7:12 PM Jay McCarthy wrote: > You need to stop using `web-server/insta` What would you recommend he use instead of 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

Re: [racket-users] triggering servlet on GET parameters

2019-01-02 Thread Jay McCarthy
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