I have a form contains three buttons print
/export
/save
.
<s:form action="/userAction">
<s:submit type="image" value="%{'print'}" src="/print.png" />
<s:submit type="image" value="%{'export'}" src="/export.png" />
<s:submit type="image" value="%{'save'}" src="/save.png" />
</s:form>
How can I map this in struts.xml
?
In order to use
method
attribute of the<s:submit>
tagDynamicMethodInvocation
must be enabled. Another solution is to useaction
attribute.In JSP:
In struts.xml:
In the
struts.xml
the action is mapped via the<action
tagthe submit buttons should include
method
attribute to call corresponding methods of the action