|
From: Joe W. <jo...@gm...> - 2023-05-24 13:00:40
|
Hi Kit, Sorry, I meant to reply earlier. The function that first came to mind was system:get-module-load-path(), but perhaps you're looking for the various request:get-* functions, one of which you already found. I agree, response:redirect-to() is cumbersome in its need for an absolute URL. But I think it literally dumps the URI you supply straight into the Location header in the HTTP 302 response, so from that perspective, its behavior makes sense. Joe On Wed, May 24, 2023 at 6:32 AM Chris Wallace <kit...@gm...> wrote: > Here is one way to get it: > > tokenize(request:get-effective-uri(),"/")[last()] > > By way of context, when executing a response:redirect-to() , the URI needs > the script name even if the redirect is to the current script. Scripts are > more maintainable when that name doesn't have to be hard-coded. > > > > On Fri, May 19, 2023 at 8:07 AM Chris Wallace <kit...@gm...> > wrote: > >> Help - I've forgotten how to get the name of the executing script. >> >> Chris >> > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |