How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions
I have the following class:
public class TestAction {
public static String concat(String str1, String str2) {
return str1 + " and " + str2;
}
}
In a JSP, I can write the following and it works fine:
<s:property value="@org.appfuse.web.TestAction@concat('1', '2')"/>
However, if I change it to an invalid class name, it fails silently:
<s:property value="@org.appfuse.web.InvalidClass@concat('1', '2')"/>
I've tried turning up the logging for org.apache.struts2, com.opensymphony.xwork2 and ognl - but it still fails silently. Any ideas how to get better error messages about invalid OGNL expressions?
Thanks,
Matt