• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[struts] No getter method for property someProperty of bean someBean

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been battling this bug for hours!!!
"No getter method for property <someProperty> of bean <someBean>"
Not sure if this is documented somewhere, but I thought I'd mention my discovery.
Struts 1.0.2 cannot detect getter methods of the ActionForm class when its corrosponding member variable starts with a lowercase letter and the second letter is uppercase.
I was trying to collect data from a html form field that was labeled "Short Description". The member variable in the action form was sDesc and getter method getSDesc(). The app kept throwing Servlet Exceptions No getter method for property sDesc....
Once I changed the member variable to shortDesc and the getter to getShortDesc(), the code worked like a charm!
[ August 06, 2002: Message edited by: Roger Graff ]
 
Author
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This follows Java's bean naming conventions, which is why the case matters.
 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Funny, I reported this to the struts team and they said the same thing! I guess I better read the Java Beans spec.
[ August 09, 2002: Message edited by: Roger Graff ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic