Mailing List webobjects-dev@wocommunity.org Message #63
From: Paul Hoadley <webobjects-dev@wocommunity.org>
Subject: Re: [WO-DEV] Stupid me but how do I generate a fully qualified direct action url for sending out via mail?
Date: Wed, 17 Feb 2021 09:14:29 +1030
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
On 17 Feb 2021, at 01:21, Susanne Schneider <webobjects-dev@wocommunity.org> wrote:

this is indeed not so trivial as you could think, at least I did not find an easy way. You can ask the application to get the name of itself, ask the WOAdaptor for the adaptor part, but you cannot find out the name of the server, especially if your installation is behind a firewall or proxy and the external server name is different from the internal name.

We finally used a custom configuration parameter to get the server name (including the adaptor path) and startet from there on, something like:
url = servername + applicationname + ".woa/wa/" + yourActionName

And then if you're using re-writing to shorten the URL, it gets even more complicated to do it in a general way. We pretty much gave up completely, and most apps now have a property like this:

net.logicsquad.example.directActionUrl=https://example.com/app/wa


-- 
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster