My guess is that this kind of expression stop to work since 2.3.1.2
version (see http://goo.gl/RYL7a)

Unfortunately //bean.getFoo('bar')// is, from OGNL prospective, an
eval expression and using it as a parameter is not a good choice in
terms of security.

You could use this kind of expression by choosing the appropriate
value for acceptParamNames (see the before mentioned security
bulletin)  or  maybe providing your own stackvalue implementation, but
do it at your own risk.


Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara


On 19 June 2012 16:46, anw <awal...@cardiweb.com> wrote:
>
> Hi,
>
> I have the following form submitted to a Struts2 action:
> <s:text name="bean.getFoo('bar').name"/>
>
> Is this input name supposed to work with ParamsInterceptor?
>
> Actually Bar.setName() is successfully set with the correct value, but it
> also adds a conversion error (xwork.default.invalid.fieldvalue) for this
> field and action is returning to INPUT.
> I didn't found the origin of the conversion error. It's very strange because
> the bean is set correctly.
>
> -------
>
> class MyAction extends ActionSupport {
>   public Bean getBean() { ... }
> }
>
> class Bean {
>   public Foo getFoo(String param) { ... }
> }
>
> class Bar {
>   public String getName() { ... }
>   public String setName() { ... }
> }
>
> Many thanks
>
> --
> View this message in context: 
> http://struts.1045723.n5.nabble.com/ParamsInterceptor-is-input-bean-getFoo-bar-name-supposed-to-work-tp5710056.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to