• 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: Main or other...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Main or other...


  • Subject: Re: Main or other...
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 03 May 2012 17:27:06 +0930

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


  • Follow-Ups:
    • Re: Main or other...
      • From: Ron X <email@hidden>
References: 
 >Main or other... (From: Ron X <email@hidden>)

  • Prev by Date: Main or other...
  • Next by Date: Re: Main or other...
  • Previous by thread: Main or other...
  • Next by thread: Re: Main or other...
  • Index(es):
    • Date
    • Thread