Why can't the Struts tags access the properties of my beans?

Ted Husted

Struts uses JavaBeans Introspector to discover properties of beans. Introspector is pretty picky in the way it decides whether something is a property or not. Specifically, it requires that 

  1. Both getter and setter be declared public and non-static 
  2. The return type of the getter be the same as the type of the argument of the setter. 

So, first check if your property breaks one of these rules.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact