Hi all,
I'm having a problem under Allaire JRun 3.0 (Struts nightly build from last
week).
The following code works in our page:
<bean:write name="sku" property="product">
and the following doesn't
<bean:write name="sku" property="product.name">
When there is a perfectly valid getName() method in the corresponding
Product returned by sku.getProduct().
The exception given is
javax.servlet.jsp.JspException: IllegalAccessException accessing property
product.name of bean sku
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225)
at
jrun__viewproduct2ejsp10._jspService(jrun__viewproduct2ejsp10.java:130)
etc.
I have traced into the org.apache.struts.util.PropertyUtils class, and it
seems to run fine to a point. It correctly splits the 'product.name' to get
the first method; invokes it, it returns an object of the correct type
(MutableProduct); iterates to "name", finds the getter method OK (as it
should), but fails on the above when invoking it.
As a test to see if it's some weird JRun security manager thing, I invoked
it in NetBeans, using the following test stub:
Object o = org.apache.struts.util.PropertyUtils.getNestedProperty(sku,
"product.name");
and it does the same thing (no JRun code in the classpath).
Any ideas? Probably something really obvious, but I've just missed it.
Thanks for any help, it's a hair-tearer.
Cheers,
Paul Cowan