Fine, I got it : it doesnt work for static function. Needed to turn struts.ognl.allowStaticMethodAccess to true (it is defaulted to false in the 2.1.8) and it s working.
What I don t understand is that I cant overwrite it in the struts.xml with: <constant name="struts.ognl.allowStaticMethodAccess" value="true" />, I had to change it in the default properties file. Is that a lack in the .xml configuration ? -----Mensaje original----- De: Nicola de Saint-Aubert [mailto:[email protected]] Enviado el: lunes, 09 de noviembre de 2009 14:04 Para: 'Struts Users Mailing List' Asunto: RV: migrating from 2.0 to 2.1.8: <s:bean> tag Hi, It seems that OGNL # operator isn't anymore interpreted while migrating from 2.0 to 2.1.8 (in a jboss applications server). The same code does work with version 2.0, but none of OGNL # operator expressions are evaluated in my jsp with 2.8. Is there something to configure in 2.8 to get it working ? Best regards. -----Mensaje original----- De: Nicola de Saint-Aubert [mailto:[email protected]] Enviado el: jueves, 05 de noviembre de 2009 18:48 Para: 'Struts Users Mailing List' Asunto: migrating from 2.0 to 2.1.8: <s:bean> tag Hi, I just have migrated from 2.0 to 2.1.8 and can t achieve in including StringUtils bean in jsp. It perfectly works with the 2.0 version. But switching to 2.1.8, the expression using StringUtils are not evaluated and the log doesn't inform anything wrong about that. Everything else works fine. Is there something I missed in the migration ? Class: public class IndexAction extends ActionSupport implements SessionAware, ValidationAware { . public void setOrder(String order) { this.order = order; } // end setOrder() public String getOrder() { return order; } // end getOrder() . } JSP: <s:bean name="org.apache.commons.lang.StringUtils" id="StringUtils" /> . <li <s:if test='( #StringUtils.isEmpty(order) || order == "date")'> class="select" </s:if>> . --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
