The syntax of your bean:write tag is correct, but you must create a mapped getter in your model class to go along with it. For more information on mapped properties, see the heading Mapped Properties in this link.
It's possible that i should need to incorporte in my /lib the commons-beanUtils.jar for a bean:write with a Map???
if I need this jar, which version is better for my struts 1.1 version??
Joined: Feb 15, 2005
Yes, you definitely do need commons-beanutils.jar in your WEB-INF/lib folder. The version you want is the one that comes with the Struts 1.1 download.
Another thing you might try is naming your mapped method something other than getData (getMappedData for exampe). In version 1.1 I seem to recall there being problems with overloaded methods in ActionForm beans.
The example you've written should work as long as you have the correct libraries. Just to prove it, below is a brief example that I tested and verified that it works. I tested this with Struts 1.3.8, but it should still work in Struts 1.1.
The Model class:
The Action Class:
The result I get is: The value is: value [ September 12, 2007: Message edited by: Merrill Higginson ]
Rafa Barcel� Bauz�
Joined: Aug 09, 2006
Thanks!!! the problem seems that in Struts 1.1 there's a problem when I overload a getter method. I have updated de beanutils jar and changed method signature and now works fine!!! .
But....., now I have another problem. How can I invocate the getter method with the struts locate language as a parameter...???