On Dec 17, 2014, at 9:16 AM, Robert B. Hanviriyapunt <[email protected]> wrote:
> I coded an action to return a WORedirect that I was hoping was the URL to the
> application’s main URL. Unfortunately it takes the internal server’s name
> (not the Apache VirtualHost name).
>
> So would a WORedirect defined to go to /cgi-bin/WebObjects/MyApp.woa work?
> And what will give me this?
Not sure how you create the redirect but is it different then whats below? It
creates a redirect to an action by name like 'default' for 'defaultAction()'.
Never had an issue with virtual host using this. I would not create the URL
manually unless you have a unique URL that WO can't self-generate.
ERXRedirect redirect = new ERXRedirect(this.context());
redirect.setDirectActionName("login");
redirect.setQueryParameters(null);
return redirect;
Or this using WORedirect:
WORedirect defaultPage = (WORedirect)pageWithName("WORedirect",
aContext);
defaultPage.setUrl(aContext.directActionURLForActionNamed(
"default",
new NSDictionary<String, Object>(Boolean.FALSE,
"wosid")));
return defaultPage.generateResponse();
I prefer the ERXRedirect.
kib
"We keep moving forward, opening new doors, and doing new things, because we're
curious and curiosity keeps leading us down new paths."
Walt Disney
Klaus Berkling
www.berkling.us | @kiberkli | Photography
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
