Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes Passing ActionForm attibute to another action Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing ActionForm attibute to another action Class" Watch "Passing ActionForm attibute to another action Class" New topic
Author

Passing ActionForm attibute to another action Class

Jaya Swaminathan
Greenhorn

Joined: Jul 19, 2005
Posts: 17
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

Joined: Feb 15, 2005
Posts: 4864
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 ]

Merrill
Consultant, Sima Solutions
Jaya Swaminathan
Greenhorn

Joined: Jul 19, 2005
Posts: 17
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing ActionForm attibute to another action Class
 
Similar Threads
Actionform not populating JSP
Show a progress page using Struts
Setting up form data
First struts app help! Drop-down lists
dynamic multibox - populate an Array in ActionForm from Action class