File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes problem with Getter Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with Getter Method" Watch "problem with Getter Method" New topic
Author

problem with Getter Method

michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
I have this Menu.jsp. I am trying to access from mencategoryArraylist but in my <bean:write > No getter method for property: "Apparel" of bean: "mencategorylist". I have written the same code to access from menarrayList that works fine to me.

Can someone tell me where I am going wrong.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'd first try using "apparel", since property names used this way should start with a lower-case.
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
By just changing the case it worked. Is it the syntax or any kind of rule that property should be written in smaller case.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's standard JavaBean naming conventions.
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
Thanks for the info
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
Once again I am facing the same problem to another property. It is not displaying any error but not showing the values in the JSP. I googles through the JSP bean naming conventions and found some thing like Javabean property change.



Can someone tell me where I am going wrong.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

How can anybody help? You're posting only one small piece of the puzzle.

Does the bean class held in mencategorylist gave a "getShow_accessiores()" method? (Note misspelling.)
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
Yes, sir it does have getShoe_accessiores

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

michell o'brien wrote:Yes, sir it does have getShoe_accessiores

Have you verified there's a value in it?Note that naming a property with a capital letter is pretty confusing to people that normally read Java code that follows normal naming conventions.
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
Oops it is showing null value.
michell o'brien
Ranch Hand

Joined: Jun 09, 2009
Posts: 37
I was actully setting value for a wrong parameter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with Getter Method