struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Vanacker (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (WW-4526) Invalid action generated by the form tag
Date Tue, 20 Oct 2015 07:34:27 GMT

     [ https://issues.apache.org/jira/browse/WW-4526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Vanacker resolved WW-4526.
--------------------------------
    Resolution: Fixed

> Invalid action generated by the form tag
> ----------------------------------------
>
>                 Key: WW-4526
>                 URL: https://issues.apache.org/jira/browse/WW-4526
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Value Stack
>    Affects Versions: 2.3.24
>            Reporter: David Vanacker
>            Assignee: Lukasz Lenart
>            Priority: Critical
>             Fix For: 2.3.25, 2.5
>
>         Attachments: struts2-form-url.zip
>
>
> Following the migration of Struts framework from 2.3.16.3 to 2.3.24, we detected that
the action attribute of HTML tag Form generated with the Struts Form Tag contains an invalid
scheme when the associated action class contains an accessor named getScheme(). 
> The value of this accessor is retrieved in org.apache.struts2.components.ServletUrlRender#renderFormUrl()
from the ValueStack.         
> ValueStack vs = ActionContext.getContext().getValueStack();
> String scheme = vs.findString("scheme");
> The attachement contains a sample that illustrate the issue. 
> Run simply the command mvn tomcat:run to execute it . 
> It contains also a "patch" that overrides de DefaultUrlHelper . It checks if the scheme
is equals to a valid scheme (http/https) and calls the default implementation. In case of
the scheme is not valid, it calls the default implementation with null argument for the scheme
( replaced by the HttpServletRequest#getScheme() in the default implementation).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message