You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jeromy Evans (JIRA)" <ji...@apache.org> on 2008/06/28 08:14:06 UTC

[jira] Commented: (WW-2691) ActionMappingParametersInteceptor is accessing request parameters

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

Jeromy Evans commented on WW-2691:
----------------------------------

IIRC, I encountered the same problem and it was caused by temporary mismatch between xwork-snapshot and s2 snapshot.

The ActionMappingParametersInterceptor extends the ParametersIntercetor. Sometime between 2.1.2 and 2.1.3 SNAPSHOT the retrieveParametersFromContext method was split into retrieveParameters and addParametersToContext.  If you didn't have the latest Xwork snaphot the ActionMappingParametersInterceptor's methods overriding the ParametersInterceptor's were not invoked. Instead the baseclass method was invoked and the parameters were read from the request instead of the ActionMapping.

Recommend changing to not a problem upon confirmation.



> ActionMappingParametersInteceptor is accessing request parameters
> -----------------------------------------------------------------
>
>                 Key: WW-2691
>                 URL: https://issues.apache.org/struts/browse/WW-2691
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.2
>            Reporter: Musachy Barroso
>            Assignee: Don Brown
>            Priority: Critical
>             Fix For: 2.1.3
>
>
> I am not really sure how this works, but it looks wrong to me. It seems like ActionMappingParametersInteceptor is trying to set parameters from the request, instead of the action mapping. To see it (throwing an exception) go to Tags/UI Example in showcase and click submit:
> ognl.OgnlException: target is null for setProperty(null, "birthday", [Ljava.lang.String;@a1fd57)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1651)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	at ognl.ASTChain.setValueBody(ASTChain.java:172)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	at ognl.Ognl.setValue(Ognl.java:476)
> 	at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
> 	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150)
> 	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:205)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162)
> At first I thought it was the params interceptor, but it is ActionMappingParametersInteceptor. In this case it is trying to set "dojo.birthday" which will fail. If ActionMappingParametersInteceptor is supposed to handle request parameters somehow, then we need to ignore the "dojo.*" and "struts.*" parameters, but I don't think this was happening in 2.0.X (hence the ticket)

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