110% POSSIBLE.
retreiving the paramter name and method calls using reflection and are already done.
all you need to do is override the implementation and rather than checking for *method* value , check for last part of URI and call the respective method.
just change execute() method in DispatchAction. you dont have to do much. just a few lines.
regards Navjot Singh
Kunal Parikh wrote:
Hi!
I was wondering if it were possible to drop the parameter attribute in a dispatch action and map an actionPath to a method/methodName ?
E.g
/createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
/editUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
/deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
instead of
/userAction?method=createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
/userAction?method=editUserUser -> public ActionForward editUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
/userAction?method=deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res )
TIA,
Kunal
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]