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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 67
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
138

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: 8707
    
    6

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?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple forms submission with one button
 
Similar Threads
handling events
problem with logical condition
Two drop-down list that used the same javascript function
doubt in getParameter()
Shura Balaganov