Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing ActionForm attibute to another action Class

 
Jaya Swaminathan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a JSP page in which I have a multibox. On checking those checkboxes, i have populated the values corresponding to them in an array in the action Form. On click of a button I need to pass this array to a different action class. I was thinking that i could set it in request. But i dont know how i could access the ActionForm attribute within the JSP and set it in request. Please let me know if there is any way to do it.

If you could think of any way to pass this form attribute to another action class please help.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can put an array of hidden fields in the JSP. That way, the values would be passed on to the next action.

Check out This thread for more discussion on this.

[ July 26, 2005: Message edited by: Merrill Higginson ]
[ July 26, 2005: Message edited by: Merrill Higginson ]
 
Jaya Swaminathan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur response. I have tried out like this and it works. I submit the form to itself and in the action class, I have set this array in the request and forward it to another action class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic