Two Laptop Bag*
The moose likes JSP and the fly likes javabean problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "javabean problem" Watch "javabean problem" New topic
Author

javabean problem

Steven Broadbent
Ranch Hand

Joined: Dec 10, 2002
Posts: 400
I have a javabean class with public and private member variables..

<jsp:getProperty name ="r" property="RoleName"/>
r is an instance of my class Role which has a member RoleName
this gives an error:-
: Cannot find any information on property 'RoleName' in a bean of type 'net.worple.staff.Role'
however I can display RoleName using the getRoleName() I defined in the bean class. No matter if RoleName is a public or private member I can't get it to display using jsp:getProperty>
I am missing something obvious. It is a while since I did any jsp.
[ January 08, 2004: Message edited by: Steven Broadbent ]

"....bigmouth strikes again, and I've got no right to take my place with the human race...."<p>SCJP 1.4
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
This is one of the "gotchas" of Java Beans.
The method getRoleName() implies that the property is actually called "roleName" (with a little 'r')
Try: <jsp:getProperty name ="r" property="roleName"/>
and see what happens


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javabean problem
 
Similar Threads
display all items from a list
<jsp:setProperty> is raising Exceptions
Bean setters not invoked when no data entered in form fields
Jasper compile error
jsp:getProperty