Struts + HTML:Button not workin



Share on Google+Share on Google+

Struts + HTML:Button not workin
1 Answer(s)      7 years ago
Posted in : Struts

I am new to struts. So pls bare with me if my question is fundamental.
I am trying to add 2 Submit buttons in same JSP page.
As a start, i want to display a message when my actionclass is called.

JSP code
<td><html:submit property="button_clicked">
<bean:message key="button.add"/></html:submit>
<td><html:submit property="button_clicked">
<bean:message key="button.delete"/></html:submit>

The above statement displays "null";

I have defined button_clicked in bean class.
I thought when i click ADD button, button_clicked will be set to key of
"button.add" and i can check accordingly in action class.
But it displays null. Please let me know what needs to be corrected.
OR Should i use 2 HTML TAG BUTTON's here instead of 2 HTML TAG SUBMIT's?
View Answers

March 11, 2010 at 10:28 AM