In the Digester user guide: http://jakarta.apache.org/struts/api/org/apache/struts/digester/package-summary.html#package_descriptionYep ... just checked in a clarification.There is an example of how to use the addObjectCreate method:
digester.addObjectCreate("struts-config/global-forwards/forward",
forwardClass, "className");Perhaps it would be less confusing if the description that reads:
A new object instance is created -- the ActionForward instance that will represent this definition. The Java class name defaults to that specified as an initialization parameter, but can be overridden by using the "className" attribute. The new forward instance is pushed onto the stack.
Read like this:
A new object instance is created -- the ActionForward instance that will represent this definition. The Java class name defaults to that specified as an initialization parameter which we have stored in the String variable forwardClass, but can be overridden by using the "className" attribute found in the the node we are currently parsing. The new forward instance is pushed onto the stack.
Either that, or just change the example to read like this:
digester.addObjectCreate("struts-config/global-forwards/forward",
"org.apache.struts.action.ActionForward", "className");Is that fair?
Craig
Craig T.--
I've been trying to change the world for years, but they just won't give me the source code....