Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4353

Automatic mapping from URL to methods in action classes

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            antonioares Antonio Sánchez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: