• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

ServletException: BeanUtils.populate

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can anybody tell me, why I get the following error message:



thank you very much
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You get this message when Struts is unable to map the data in the HTML form to the properties in your ActionForm bean. Make sure each of the properties on your bean is either a String or a boolean. Do you have any properties of type java.util.Date or other objects? That might cause this error. Also check to see that you have public getters and setter for each of your properties.
 
Hubert Pernegger
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi merrill,
the properties of my bean are String and Integer...and yes I checked the getters and setters....
and I don't have java.util.Date and other things...
 
Hubert Pernegger
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jsp code:



function:



action


thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A property of type Integer could still cause this error. If you want to keep internal representation of the property as an Integer, that's fine, but change the setter so that it accepts a String, and then convert it to an Integer.
 
Hubert Pernegger
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi merril,
thanks a lot, you are right it worked that way
thank you very much, wish you a nice evening....

regards
 
I want my playground back. Here, I'll give you this tiny ad for it:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic