Re: Main or other...
Re: Main or other...
- Subject: Re: Main or other...
- From: Ron X <email@hidden>
- Date: Thu, 03 May 2012 11:22:09 +0300
yes, now i do that:
public LSXApplication() {
setDefaultRequestHandler(new ERXDirectActionRequestHandler());
}
but nothing changed :-(
2012/5/3 Paul Hoadley
<email@hidden>
Hi Ron,
On 03/05/2012, at 5:12 PM, Ron X wrote:
> hi for all
>
> i wanna to start application using another component - not Main!
>
> so i do:
>
> @Override
> public WOActionResults defaultAction() {
> return pageWithName(Start.class);
> }
That alone is not quite sufficient, but from the stack trace it _looks_ like you've also set the default request handler in your Application class:
> WOActionRequestHandler.java 259 _handleRequest com.webobjects.appserver._private
> WOActionRequestHandler.java 158 handleRequest com.webobjects.appserver._private
> ERXDirectActionRequestHandler.java 126 handleRequest er.extensions.appserver
> WOApplication.java 1687 dispatchRequest com.webobjects.appserver
> ERXApplication.java 2096 dispatchRequestImmediately er.extensions.appserver
> ERXApplication.java 2061 dispatchRequest er.extensions.appserver
Have you done that? That is, called setDefaultRequestHandler(new ERXDirectActionRequestHandler()) in Application's constructor?
(Even that's not _quite_ sufficient to cover all bases. It turns out that the "Main" component is hard-coded in at least a couple of WebObjects classes, including WOApplication.pageWithName(String aName, WOContext aContext). That's relevant if 'aName' is null, which happens when you request '.../SomeApp.woa/wo/'—the method looks for a "Main" component in that case. To cover every base, you also need to override that.)
--
Paul Hoadley
http://logicsquad.net/
_______________________________________________
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