aspose file tools*
The moose likes Struts and the fly likes Any possible of doing 2 actions in single button using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Any possible of doing 2 actions in single button using struts" Watch "Any possible of doing 2 actions in single button using struts" New topic
Author

Any possible of doing 2 actions in single button using struts

khizar dheen
Greenhorn

Joined: May 30, 2007
Posts: 13
I have a page of user registration,when the user register and submit the form it will store values in the database and same time data are also display in next page

single save button is used for both storing the values in database and display in another page its possible
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
As per the requirement,
When an "Save" Button is clicked, it need to be forwarded to an SAVE Method using STRUTS mapping.In the SAVE Method, After the save Functionality has been completed by using

"response.sendRedirect("/sample.html?dispatch=view&from=save&userId="+userIdGeneratedFromSaveAction);"

This will be forwarded to View Action,UserId can be obtained in that action and you can Display the details.
 
Consider Paul's rocket mass heater.
 
subject: Any possible of doing 2 actions in single button using struts