I am trying to find the namespace and action name with wildcards but it gets failed.
Exception :
WARNING: No configuration found for the specified action: '/checkMethods/executeCRUD' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
XML :
<package name="crudAction" namespace="/checkMethods" extends="struts-default" >
<action name="*CRUD" class="leo.struts.HelloWorldAction" method="{1}">
<result name="success" >/crud.jsp</result>
</action>
</package>
JSP:
<body>
Action so Far : <s:property value="message"/>
<s:form action="/checkMethods/deleteCRUD" >
<s:submit label="delete"/>
</s:form>
<s:form action="/checkMethods/selectCRUD" >
<s:submit label="select"/>
</s:form>
<s:form action="/checkMethods/updateCRUD" >
<s:submit label="update"/>
</s:form>
<s:form action="/checkMethods/executeCRUD" >
<s:submit label="execute"/>
</s:form>
</body>
In the
action
attribute you should specify the action name without slashes. LikeThat would resolve action mappings but it will not save you from updating data.
Having multiple
form
s on the page separate theinput
fields by thes:form
tag.If you want to have several buttons mapped to each own action that operate on the same data then you should create one form and several submit tags, and each tag map to the
method
oraction
attribute.See this answer how to do it.