• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to pass parameter from jsp page to struts action class

 
dhaval tamboli
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using struts2.
Actually I am stuck at one point. I do have one form and there are 3 submit calls in same form. In last submit call, I am inserting record in database but to know which one is final submit, I need to pass some flag saying that this is final submit.

so, I though to set parameter in jsp page (when last submit pressed) and trying to get parameter in action class but it says null. so, I am confused to do what next.

Here, is my code and also if there is any other method doing so then please let me know.




Thanks
Dhaval
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct way to accomplish what you want would be to use the Struts submit tag with a different action.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are all those scriptlets for? And why bother using Struts 2 if you're going to manually code, in a scriptlet, what the framework gives you for free?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic