Re: Eclipse Launch w/ AutoOpenInBrowser and DirectConnect but specifying a different URL
Re: Eclipse Launch w/ AutoOpenInBrowser and DirectConnect but specifying a different URL
- Subject: Re: Eclipse Launch w/ AutoOpenInBrowser and DirectConnect but specifying a different URL
- From: Hugi Thordarson <email@hidden>
- Date: Sun, 30 Aug 2015 10:20:19 +0000
HI Robert.
I don’t think you can change the default URL for WOAutoOpenInBrowser, but you could make your application return a redirect to the page you want. Make the direct action request handler the default request handler (for example by invoking setDefaultRequestHandler( requestHandlerForKey( directActionRequestHandlerKey() ) ); in your Application class's constructor) and then set DirectAction.defaultAction to something like:
public WOActionResults defaultAction( ) {
WOResponse w = new WOResponse();
w.setHeader( [your URL], “location" );
w.setStatus( 302 );
return w;
}
Cheers,
- hugi
// Hugi Thordarson
// http://www.loftfar.is/
// s. 895-6688
> On 30. ágú. 2015, at 05:43, Robert Hanviriyapunt <email@hidden> wrote:
>
> Hey guys,
>
> I have a weird question. Is it possible to launch my WOApp in Eclipse with pretty much the default Launch/Run config settings except have the Browser automatically open a different URL?
>
> I server up static pages from Apache under url http://foo/bar that has javascript posting to the WOApp and just want the Launch of my WOApp in eclipse to just go to my static pages in Apache first.
>
> I’m just lazy and don’t want to make a bookmark to http://foo/bar that I have to click once my normal http://foo:1234/cgi-bin/WebObjects/MyApp.woa page shows up.
>
> = Robert =
>
>
> _______________________________________________
> 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
_______________________________________________
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