• 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: defaultAction returning wrong component in Application request handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defaultAction returning wrong component in Application request handler


  • Subject: Re: defaultAction returning wrong component in Application request handler
  • From: Theodore Petrosky <email@hidden>
  • Date: Tue, 12 Aug 2014 16:01:06 -0400

I take that back.

I just tried it on one of my apps

@Override
public WOActionResults defaultAction() {
//return pageWithName(Main.class.getName());
return pageWithName(KickOffBriefInstructions.class);


}

worked fine to substitute KickOffBriefInstructions for MAIN
Maybe Hugi’s response is what you need.



On Aug 12, 2014, at 3:32 PM, Larry Mills-Gahl <email@hidden> wrote:

I am trying to use a different default component in the defaultAction. 
The defaultAction is pretty straight forward:

@Override
public WOActionResults defaultAction() {
return pageWithName(CPEMain.class);
}

… but the Application still looks for “Main” when calling the base application url ( (e.g. /cgi-bin/WebObjects/VACPE_201407_RC4.woa instead of /cgi-bin/WebObjects/VACPE_201407_RC4.woa/wa/default)


CPEMain is just the default Main component renamed. Using the full url to the default directAction works as expected, but the application still tries to use “Main” when no explicit action is given. I’m trying to avoid some class path issues with other classes named Main. It seems like somewhere in WOApplication the string for the component name is being set (rather than the class as in ERXApplication.pageWithName) and that is causing the class path issues and this insertion of “Main” as the component name to return.

I’ve seen this through Apache, and in direct connect also. 

Does anybody have suggestions on where I can look next?


ERROR 14:55:49 (com.vascalert.cpe.Application:38):  handleException(Exception, WOContext) - Exception _exception=com.webobjects.appserver.WOPageNotFoundException: <com.vascalert.cpe.Application>: Unable to create page 'Main'.
com.webobjects.appserver.WOPageNotFoundException: <com.vascalert.cpe.Application>: Unable to create page 'Main'.
at com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java:2346)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:284)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2112)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2077)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)


Larry Mills-Gahl
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
  • Prev by Date: Re: defaultAction returning wrong component in Application request handler
  • Next by Date: Re: mod_proxy as mod_WebObjects alternative [Was: Re: Yosemite]
  • Previous by thread: Re: defaultAction returning wrong component in Application request handler
  • Next by thread: Re: angular and rest questions
  • Index(es):
    • Date
    • Thread