I find that using parameters in urls is confusing in struts, and there
are just too many (and not compatible) ways of doing it, for example,
if you want to have parameters in front of the action name, like

/something/param1/param2/ActionName

you would have to use the "namedVariable" action mapper, but then, you
cannot have parameters after the action name ("ActionName"). If you
want to have parameters after the action name, then you can use
wildcards, and do something like:

<package name="edit" extends="struts-default" namespace="/edit">
    <action name="/person/*"
class="org.apache.struts.webapp.example.EditAction">
        <param name="id">{1}</param>
        <result>/mainMenu.jsp</result>
    </action>
</package>

And maybe, you can mix them, but I haven't tried that. I find all this
very confusing and hard to understand. I would like to do this:

class MyAction {
  String param1, param2, param3;

  @Action("/{param1}/{param2}/MyAction/{param3}")
  public void execute() {....}
}

and the framework should figure out the rest for me. I don't think
this would be that hard to implement and should provide an unified way
of handling these type of urls. Thoughts?

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to