• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot find any information on property of a Bean  RSS feed

 
Sandip Sarkar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a jsp which has JDBC code for connecting to the database.The data is retrieved and stored in a Bean.
When i try running the jsp page i get an error "org.apache.jasper.JasperException: Cannot find any information on property 'client' in a bean of type 'data.test1'".
the JDBC code is working fine as it successfully retrieves the data if i run it seperately as a class.
Please guide me. The source code files are as follows:

File://data.test1.java


------------------------------------

File: Mydb.jsp




Thanks
Sandip
 
Parham Emami
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First,Change your member variable modifiers to private.
Second, this could be the result of incompatible versions of app server and your JDK (I've experienced once before).

Cheers
 
Sandip Sarkar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

The member modifiers once made private get me the same error.I think its an implementation issue whether to declare public/private. Dont think that has been anywhere in bean standards.

I am using Jdk 1.5 and Tomcat 4.1
DO you have any clue regarding incompatible versions ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the following:
  • Be Java friendly. Give your class a name starting with a capital letter
  • Be bean friendly. Give your getters/setters names obeying the JavaBeans specification. Like setClient/getClient, not setclient/getclient

  •  
    Sandip Sarkar
    Ranch Hand
    Posts: 55
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Christophe,

    Thanks for the reply.
    I had tried out the things which you highlighted like setting the getter/setter methods with apprpriate names and using a friendly class name.

    Still getting the same issue.
    Please help.Am stuck up.
     
    Roger Chung-Wee
    Ranch Hand
    Posts: 1683
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Don't the setters have to conform to standards, eg:

    public void setClient(String s){
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!