Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Passing objects between actions in struts2

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, forget it, I'm simply passing them through the session.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*bumps this .....

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

anyone ? please ?
 
You can't have everything. Where would you put it?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic