In JSP , two radio buttons are there. In action class have two methods .if select first radio button ,then submit it, it has to execute first method. if select second radio button ,it has to execute second method.
I wrote code in JSP,
how to write in strut.xml and action class in strut 2
I didn't know what you are doing in the method's as per my understanding here we can solve it in two ways
1) Identify which radio button is selected in your action call and do process appropriately.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Joined: Feb 13, 2012
Consider First one, By using java script I can identify the which radio button i selected.suppose i selected save radio button.In java script ,using get value of that button.hence how to proceed . how do i call method
So, you are calling same action class whatever the radio button was selected then you must know that is the which radio button was selected in the action class. Based on the condition call the appropriate action. I hope this helps.