aspose file tools*
The moose likes Struts and the fly likes How to pass java object b/w two actions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to pass java object b/w two actions" Watch "How to pass java object b/w two actions" New topic
Author

How to pass java object b/w two actions

shwetank sharma
Greenhorn

Joined: Jan 09, 2011
Posts: 10

Hi All,

Issue i m facing is that, i cannot pass object from one action class to another action class through jsp.

Let me explain you the scenario,

One of my action say action CreateView generates a view over jsp which contains multiple checkboxes,
also this action creates one hashmap which contains some data at the time of view generation.

I have kept that value as hidden



*Getter Setter for priorMap are present in action class

Now on submitting the form, i want to access that hashmap,

but it returns me null.

Thanks in advance..

Cheers,
Shwetank


~~Cheers~~
Shwetank
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

That's not going to work. HTML form fields are simple text. They can't hold a complex object like a map.
The easiest thing to do would be to store the map in the session.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: How to pass java object b/w two actions