struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Wannemacher (JIRA)" <>
Subject [jira] Updated: (WW-3193) Form action always inherits parent extension
Date Mon, 21 Sep 2009 15:31:02 GMT


Wes Wannemacher updated WW-3193:

    Fix Version/s: 2.1.9

pushing until 2.1.9

> Form action always inherits parent extension
> --------------------------------------------
>                 Key: WW-3193
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.1.7
>            Reporter: Jasper Rosenberg
>            Priority: Minor
>             Fix For: 2.1.9
> Here is the basic issue.  I have an url that has no extension, eg. /Overview-Mustang-c1234
> On that page, I have a form tag that I want to have submit to action "changeCar.action",
and so the "action" attribute is set to "changeCar".  
> This used to work.  However, task changed
the behavior so that the form's action gets the parent mapping's extension [DefaultActionMapper.getUriFromActionMapping()
called from ServletUrlRenderer.renderFormUrl()], in this case the empty string, so the generated
action ends up as just "changeCar" rather than "changeCar.action"  Because we have some special
handling for our mappings, this url ends up as a 404.  It just doesn't seem desirable in general
however that the same form included on different pages with different extensions will generate
posts to two differently named urls.
> I understand the concept behind this change, but I wonder if it would be safer to revert
it, and instead add support for an attribute on the form which is "extension" which if present
overrides the default, but otherwise the default is used.  Alternatively, it could be an mutli-value
such as "inherit" (new behavior), "default" (old behavior), or ".ext" (a specific extension).
 With the default value being "default" so as to maintain backwards compatibility to the 2.0

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message