aspose file tools*
The moose likes Struts and the fly likes Multiple forms submission with one button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple forms submission with one button" Watch "Multiple forms submission with one button" New topic
Author

Multiple forms submission with one button

Swapna latha
Ranch Hand

Joined: Dec 18, 2011
Posts: 70
Hi all,

I am developing an astrology website, in which there are two forms , two forms are for male and female.

Both male and female enter their date of birth details as name, date of birth, time of birth and place of birth. I have a simple pojo class with the fields as mentioned. I can able to save single form details.

I am not getting any idea how to store two forms information on one click.

thanks

swapna
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30938
    
158

Is this Struts 1 or 2? In Struts1, you can't. You'd have to do one of the following:
1) Create a form with both
2) Have Struts automatically populate one form and use request.getParameter() in your action to populate the other one manually.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

Why do you have two separate forms if the information on both forms is the same? Why not have a radio button for male/female and use a single form?
If you have to display male and female information, why not make a single form and sort out the data in your action?


[How To Ask Questions On JavaRanch]
 
jQuery in Action, 2nd edition
 
subject: Multiple forms submission with one button