I'm migrating my application from Struts1 to 2.5. All the navigation url is defined as per below :
../menumanager.do?method=adduser
../menumanager.do?method=deleteuser
In struts 1 we extend dispather action class and reading the method name from query parameter. Using action forward we are redirecting to particular method.
Is there any way in struts 2, we can define same action name in struts.xml and besed on method name in the url we will redirect to paricular method.
I tried below code. When I hit ../menumanager.do?method=adduser it is going to last method of action class.
<action name="menumanager" method="adduser" class="X.Action">
<result name="login">Some JSP</result>
<result name="logout">Some JSP</result>
</action>
<action name="menumanager" method="deleteuser" class="X.Action">
<result name="login">Some JSP</result>
<result name="logout">Some JSP</result>
</action>