• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ServerName outside RR loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ServerName outside RR loop?


  • Subject: Re: ServerName outside RR loop?
  • From: Jon Nolan <email@hidden>
  • Date: Tue, 02 Feb 2010 11:44:11 -0700
  • Organization: Loch Garman

Mike Schrag wrote:
As an aside, this need is related to generating direct action URLs without a context or request (i.e. within a background thread.) Is it worthwhile to anyone beside me to have a directActionURLForActionNamed(...) method that doesn't depend on (ERX)WOContext? I keep running into this with threaded email generation, user-agent headers in a crawler, etc. When I get some time I may jump on it.
It should be easy to assemble:
"http://"; + WOHost property + WOCGIAdaptorUrl property + WOApplicationName property + ".woa/" + application.directActionRequestHandlerKey() + "/" + actionName
this has limitations ... if you have multiple incoming domains, you won't know at the time you generate this which domain you should hand back for a given user whereas the context would have the domain name they used to come into the site. this may or may not be a problem for you.

ms
In my current scenario this isn't a problem but I have thought of it. I believe I'd probably leave the implementation of host disambiguation to the direct action itself. For example, generate a DA URL along the lines of http://generichost.com/.../wa/doSomething?id=123456 and let it figure out from the query string which host is in play. Possibly do a redirect from there.

Otherwise you're stuck with some really spooky request mapping and related storage unless you somehow coupled the DA generation routine to your business logic and derived the host from the query dictionary.

Thanks for the help gents.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >ServerName outside RR loop? (From: Jon Nolan <email@hidden>)
 >Re: ServerName outside RR loop? (From: Chuck Hill <email@hidden>)
 >Re: ServerName outside RR loop? (From: Jon Nolan <email@hidden>)
 >Re: ServerName outside RR loop? (From: Chuck Hill <email@hidden>)
 >Re: ServerName outside RR loop? (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: New look for wocommunity.org
  • Next by Date: Re: ServerName outside RR loop?
  • Previous by thread: Re: ServerName outside RR loop?
  • Next by thread: Re: ServerName outside RR loop?
  • Index(es):
    • Date
    • Thread