Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Any possible of doing 2 actions in single button using struts
 
Similar Threads
Struts Buttons
Hi Experts, Big problem
Updating Multiple form beans at a time from jsp page
How to insert multiple rows in the database within one go
User Id validation problem on JSP page