Ah, as usual I figured out something after I sent the message: The example is that you can hit your localhost:999 and get your app in DirectConnect, but application().directConnectURL() generated 127.0.0.1 for me instead of localhost. This seemed to be the same behavior on a server that is named Server1, but also virtual in Apache as www.domain.com. I could not find anything that would maintain the request’s www.domain.com host name in the URL.
So I looked at WOApplication parameters and instead set the following: -WOAdaptorURL http://www.domain.com/cgi-bin/WebObjects -WOHost www.domain.com (local eclipse woapp launch configuration — which stopped the app from generating 127.0.0.1) -WOAdaptorURL http://localhost/cgi-bin/WebObjects -WOHost localhost On the web server I set this per application for the virtual host name that the app was supposed to be run under, although in reality all virtual hosts could run all the woapps on the server: (all virtualized in Apache on the same webserver) http://www.domain1.com/cgi-bin/WebObjects/MyApp1.woa (-WOAdaptorURL http://www.domain1.com/cgi-bin/WebObjects -WOHost www.domain1.com) http://www.domain2.com/cgi-bin/WebObjects/MyApp2.woa (-WOAdaptorURL http://www.domain2.com//cgi-bin/WebObjects -WOHost www.domain2.com) So far I am waiting to restart the app to see if this will work. I have to wait till everybody is done testing. I dunno if this was the right thing to do, but I think it should work ok. -- Robert B. Hanviriyapunt On Dec 17, 2014, at 2:00 PM, [email protected] wrote: > Send Webobjects-dev mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.apple.com/mailman/listinfo/webobjects-dev > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Webobjects-dev digest..." > > > Today's Topics: > > 1. If I want an action to return a redirect to the application's > main URL, what do I use? (Robert B. Hanviriyapunt) > 2. Re: If I want an action to return a redirect to the > application's main URL, what do I use? (Klaus Berkling) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 17 Dec 2014 11:16:48 -0600 > From: "Robert B. Hanviriyapunt" <[email protected]> > To: [email protected] > Subject: If I want an action to return a redirect to the application's > main URL, what do I use? > Message-ID: <[email protected]> > Content-Type: text/plain; charset="windows-1252" > > 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? > > -- > Robert B. Hanviriyapunt > Director of Product Development and Architecture > > > / EDC Technology > > Direct 312.246.5509 > Fax 630.243.5799 > > [email protected] > [email protected] > http://www.EDCTechnology.com > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.apple.com/archives/webobjects-dev/attachments/20141217/8e046788/attachment.html> > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: LStreetC-logo-for-mail.png > Type: image/png > Size: 13844 bytes > Desc: not available > URL: > <http://lists.apple.com/archives/webobjects-dev/attachments/20141217/8e046788/attachment.png> > > ------------------------------ > > Message: 2 > Date: Wed, 17 Dec 2014 09:43:31 -0800 > From: Klaus Berkling <[email protected]> > To: WebObjects Development <[email protected]> > Subject: Re: If I want an action to return a redirect to the > application's main URL, what do I use? > Message-ID: <[email protected]> > Content-Type: text/plain; charset="windows-1252" > > > 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 > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.apple.com/archives/webobjects-dev/attachments/20141217/9f09a616/attachment.html> > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: smime.p7s > Type: application/pkcs7-signature > Size: 4806 bytes > Desc: not available > URL: > <http://lists.apple.com/archives/webobjects-dev/attachments/20141217/9f09a616/attachment.p7s> > > ------------------------------ > > _______________________________________________ > Webobjects-dev mailing list > [email protected] > https://lists.apple.com/mailman/listinfo/webobjects-dev > > End of Webobjects-dev Digest, Vol 11, Issue 619 > ***********************************************
_______________________________________________ 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]
