[Seaside] How do I get the base URL? I want to send out an email with a link

Sean Allen sean at monkeysnatchbanana.com
Wed Aug 4 20:32:55 UTC 2010

if what you need is the 'Host' header from the request,

check out the host method on the request ( WARequest )

but that probably isnt what you want in your case. you could have a
problem because seaside doesnt assume that applications are on the
same host. you could have multiple hosts that point to the same
application or you could be proxying certain hosts to certain
applications etc.

i worked on an application where we did many hosts all using the same
application but with different content so we could just use the Host
header to verify that the host we were serving content for matched the
host header.

On Wed, Aug 4, 2010 at 3:58 PM, Pat Maddox <patmaddox at me.com> wrote:
> Okay so the high level goal is to send out an email that contains a link to my application.  Think http://myapplication.com/invite/abc123
> I'm not sure how to go about doing this.  I found  WAApplication#url which sent me on an interesting journey...because when I did "self halt" inside of a WAComponent subclass and ran "self application" then I get a WARequestContextNotFound error, although apparently that's only when I launch a debugger.
> So after figuring out that I can't access "self application" from the debugger I finally got "self application url" rendered on my page, and saw that it was only the path.  How can I get the full URL?  I don't want to hardcode it...I assume I should be able to get the base URL of my application from somewhere but I'm not sure.
> Thanks,
> Pat
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list