JavaRanch Home    
 
This page:         last edited 20 March 2007         What's Changed?         Edit

Populate Error   

Exception thrown : javax.servlet.ServletException: BeanUtils.populate

This error occurs as Struts is trying to populate the properties in your ActionForm from the data entered into an HTML form. It means that Struts is unable to convert the String that is coming from the HTML form into whatever data type you specified for a property in your ActionForm. For example, if you have a property of type java.util.Date, you'll get this error because Struts (or more accurately, the BeanUtils) can't convert a String into a java.util.Date object. The safest way to avoid this error is to make all the properties of an ActionForm Strings and then convert them into other data types later on in your model classes.



Return to StrutsFaq

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton