File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any possible of doing 2 actions in single button using struts

 
khizar dheen
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic