struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4788) Parameters which are added via ServletDispatcherResult aren't availabe in #parameters
Date Sat, 22 Apr 2017 09:17:04 GMT

    [ https://issues.apache.org/jira/browse/WW-4788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979824#comment-15979824
] 

ASF subversion and git services commented on WW-4788:
-----------------------------------------------------

Commit d8284846db6d761ec456d6b495451efa684326ce in struts's branch refs/heads/master from
[~aleksandr-m]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=d828484 ]

WW-4788 Parameters which are added via ServletDispatcherResult aren't availabe in #parameters


> Parameters which are added via ServletDispatcherResult aren't availabe in #parameters
> -------------------------------------------------------------------------------------
>
>                 Key: WW-4788
>                 URL: https://issues.apache.org/jira/browse/WW-4788
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Results, Value Stack
>    Affects Versions: 2.5.10
>            Reporter: Michael Hintenaus
>            Assignee: Aleksandr Mashchenko
>             Fix For: 2.5.next
>
>
> before Version 2.5.5 the parameters were accessible via #parameters (example: #parameters.foo)
> now I won't get the parameters which are defined via location, only the request parameters
> I have an action like this
> {code:title=MyTest.java|borderStyle=solid}
> @Action(value = "execute", results = @Result(name = SUCCESS, type = DISPATCHER, location
= "index.jsp?foo=bar"))
> public String execute() {
>     return super.execute();
> }
> {code}
> and that's the TestCase
> {code:title=MyTest.java|borderStyle=solid}
>         @Test
>         public void testParameters() throws UnsupportedEncodingException, ServletException
{
>                 request.addParameter("test", "me");
>                 executeAction("/test/dispatcher/execute.html");
>                 assertEquals("me", findValueAfterExecute("#parameters.test[0]"));
>                 assertEquals("bar", findValueAfterExecute("#parameters.foo[0]"));
>         }
> {code}
> my current workaround:
> {code}
> #attr['com.opensymphony.xwork2.ActionContext.parameters'].foo
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message