It's not a secret anymore!
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action in Action" Watch "Action in Action" New topic

Action in Action

Sai Prakash

Joined: Jul 03, 2009
Posts: 8

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

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: 2904

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:
subject: Action in Action
jQuery in Action, 3rd edition