• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Forwarding to multiple actions

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got following problem: in struts-config i have 2 actions and the action-classes are extending dispatchactions (MainAction & SubAction).

I have also some forwards to the 2 actions like "/doMain.do?action=init" (1) and "/doSub?action=initSub" (2). When i first forward to (1) and next i forward to (2), i get just a white web browser and it seems that there is somewhere an endless loop or something like that.

When i move the initSub method to the MainAction and change the forward to "/doMain.do?action=initSub" it works great (and nothing to the code has been changed).

Anyone got a clue of this problem and how to solve it? Or is it just in possible to forward from one action to another?

ps. The reason why i use 2 action classes etc. is because it's a quite large project and so i want to divide it in some smaller parts.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If i do: SubAction extends MainAction, it also works great. Is there some logical explanation for this behavior?
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you have a BaseActionClass you never really need to map any url to it, all the mappings would be to the subclass.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that makes sense idd.

is there another solution to do this ?
[ August 03, 2004: Message edited by: Roel De Nijs ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic