• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can i post form data to two action with one button?

 
sanat meher
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

Can anybody tell me how to post the form data to two action with one button. i.e. When i click or enter the submit button,then the form data should be submited to two actions say 1.jsp and 2.jsp.
And in both the jsp pages i should be able to retrive the form data from the source form using request.getparameter().

Thanks in advance..
Sanat Kumar Meher

[ November 06, 2008: Message edited by: sanat meher ]
[ November 07, 2008: Message edited by: Bear Bibeault ]
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure you know that an action on the form can only refer to one method. You can capture all the variables in the initial action class store them and then have the other action class method get it from there. Others may have better ideas.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could chain the JSPs on the server side as Bosun has suggested or, instead of using a regular form post, make AJAX calls to both JSPs and deal with their responses in Javascript on the client.

If you need more help with the second approach, let us know and we can move this question to our HTML/Javascript forum for you.

-Ben
 
sanat meher
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your suggestions. yes i need more help on the 2nd approach..

thanks,
Sanat Kumar Meher
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!