• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your suggestions. yes i need more help on the 2nd approach..

thanks,
Sanat Kumar Meher
reply
    Bookmark Topic Watch Topic
  • New Topic