• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass java object b/w two actions

 
shwetank sharma
Greenhorn
Posts: 10
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Joe Ess
Bartender
Posts: 9313
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic