This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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