*
The moose likes Struts and the fly likes Passing objects between actions in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing objects between actions in struts2" Watch "Passing objects between actions in struts2" New topic
Author

Passing objects between actions in struts2

eddy johns
Ranch Hand

Joined: Feb 16, 2010
Posts: 67
Hi all,

How do you pass objects between actions in struts2? I have a parent action, which calls a child action and I'm trying to pass parameters like this in the JSP page:


But I get exceptions that I "can not set field doctor in class ChildAction to String." Now, there is a Doctor object declared in the ChildAction.java, and also in the ParentAction.java, but it seems to have no effect.

In short, I'm at a loss with this. Any ideas? All I need to do is simply pass objects between the parent, main action, to the ones called from it. Should be simple..

Thanks,
Eddy
eddy johns
Ranch Hand

Joined: Feb 16, 2010
Posts: 67
OK, forget it, I'm simply passing them through the session.
terence poh
Greenhorn

Joined: Feb 01, 2011
Posts: 3
*bumps this .....

it's exactly what I want to do too ... passing composite objects from one action to another.

anyone ? please ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing objects between actions in struts2