struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Jalenak" <>
Subject [OT - BeanUtils.populate] 'Case' of property name
Date Tue, 08 Oct 2002 16:32:23 GMT
I may just be out of luck, but maybe someone can tell me an easy way of
fixing this....

I get a ResultSet back from a database call.  Using ResultSetMetaData, I
grab the column names and values and put them in a HashMap.  I then use
BeanUtils.populate to 'set' the values in a JavaBean.  The problem is that
the column names from the ResultSetMetaData are all in upper case; all of my
bean properties follow the normal naming scheme where the property starts
off in lower case, then each 'word' is capitalized.  Since
BeanUtils.populate doesn't find a matching setter method, it never copies
the data.  The JavaDoc for BeanUtils.populate talks about custom 'setter'
using something called a BeanInfo class, but I can't seem to find any info
on this (probably looking in the wrong place...).  Is there an easier way to
fix this other than renaming all of my properties (on my JSP, in my beans,


Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

This transmission (and any information attached to it) may be confidential and is intended
solely for the use of the individual or entity to which it is addressed. If you are not the
intended recipient or the person responsible for delivering the transmission to the intended
recipient, be advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify LabOne at (800)388-4675.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message