• 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

javabean problem

 
Ranch Hand
Posts: 400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic