jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes how to pass parameter from jsp page to struts action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to pass parameter from jsp page to struts action class" Watch "how to pass parameter from jsp page to struts action class" New topic
Author

how to pass parameter from jsp page to struts action class

dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
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

Joined: May 05, 2010
Posts: 213

The correct way to accomplish what you want would be to use the Struts submit tag with a different action.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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?
 
 
subject: how to pass parameter from jsp page to struts action class
 
Similar Threads
How do i adjust the label width n make it bold ? in the jsp of Struts2 aplication ?
s:doubleselect exception/ error
<s:property value=""> in comparison
How to access selected values of dynamically generated multi select list on jsp from action method?
problem in giving onChange event in s:combobox