• 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

Probably it's just a simple question (ActionForward?)

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

Please help me a bit.

I need to do the following.

There are a bunch of my Action's (*.do).
They can be called from HTML FORM's, or just via simple href="..." links.

In all of these Action's, they will do some calculations/checkings, and in some cases will redirect to
mapping.findForward("specialaction")
this "specialaction" will do it's own job, but AFTER that it will need to return to Action which called it, but exactly the way how this previous Action was called (if via HTML FORM - with all data, etc.)


How can I do that?

Thank you!
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My advice is to not forward to another action object. Just use a basic java class, instanciate it in any action object you need to and use its functions.

You could make the object a singleton so that it is instanciated only once and becomes available for any action object that needs it.


This would eliminate the need to do multiple forwards and allow you to do all your processing in a single action class.
[ March 01, 2005: Message edited by: Mark Hartnett ]
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ALong with what Mark said, check out the following thread:

https://coderanch.com/t/50284/Struts/Struts-Recipes-Action-chaining-recipe
 
Olexiy Prokhorenko
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunatelly, I cannot instantiate a class.
This separated Action form can do numerous operations, even presenting few HTML FORMs, and processing their input... and only after that - return to Action which initially called it.

So, it's not an option. Not in my case.
reply
    Bookmark Topic Watch Topic
  • New Topic