my dog learned polymorphism*
The moose likes Struts and the fly likes Action in Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action in Action" Watch "Action in Action" New topic
Author

Action in Action

Sai Prakash
Greenhorn

Joined: Jul 03, 2009
Posts: 8
Hi,

Is it possible to call one action class from another action class ?






Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

that is what ActionForward do
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Which version of Struts?

Also, make *very* sure you really want to do this--action chaining is a strongly-discouraged practice.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

seetharaman venkatasamy wrote:that is what ActionForward do

No, ActionForward redirects or forwards the action class once its finished with the activities. Its a return type of Actions execute() method and can be mapped in struts config or can be build in the action class it self.

Now it may call another action, but it will create new object of request and response.
And what I suppose the original author asked is like this:



[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action in Action