Antonio Sánchez created WW-4353:
-----------------------------------
Summary: Automatic mapping from URL to methods in action classes
Key: WW-4353
URL: https://issues.apache.org/jira/browse/WW-4353
Project: Struts 2
Issue Type: Improvement
Components: Plugin - Convention
Reporter: Antonio Sánchez
Priority: Minor
Fix For: 2.5
Provide Conventions with automatic mappings from url to methods in action
classes. For instance:
/person -> com.myapp.actions.Person#execute (SUCCESS) -> person.jsp
/person-edit -> com.myapp.action.Person#edit -> person-edit.jsp
/person-submit -> com.myapp.actions.Person#submit -> person-submit.jsp ||
person-input.jsp
Currently, only class names are mapped:
/person-edit -> com.myapp.action.PersonEdit#execute (SUCCESS) ->
person-edit.jsp
This forces a one class per action design, which is usually unacceptable.
Beyond the benefit itself of providing this feature, it would allow using
Conventions for designing generic actions (generic CRUD action, for instance).
Currently it is not possible and wildcard mappings is the only choice.
Discussed here:
http://markmail.org/message/luquq6wfeqbng6kj
--
This message was sent by Atlassian JIRA
(v6.2#6252)