[ 
https://issues.apache.org/struts/browse/STR-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41988
 ] 

Eric Jain commented on STR-2085:
--------------------------------

Examples:

/foo/?query=bar -> internal rewrite to search.do?query=bar
/foo/42 -> internal rewrite to retrieve.do?id=42

Now the problem is how to make an html:form that submits to /foo/ rather than 
search.do (which is something we do not want to expose).

Actually I've already implemented this by subclassing FormTag and overriding 
renderFormStartElement to output action="/foo/" instead of action="search.do", 
but this does seem like a bit of a hack...

> Allow action attribute to be overridden
> ---------------------------------------
>
>                 Key: STR-2085
>                 URL: https://issues.apache.org/struts/browse/STR-2085
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Taglibs
>    Affects Versions: 1.1.0
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Eric Jain
>            Assignee: Struts Developers
>            Priority: Minor
>
> Currently, the html:form tag always uses the action mapping URL as a value for
> the HTML 'action' attribute. In order to create REST-style web interfaces, it
> may be necessary to override this value with a custom, context relative URL. 
> One
> solution would be to introduce a new boolean 'direct' property. If set to 
> true,
> renderFormStartElement would then use the value of the 'action' property 
> directly.

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

Reply via email to