• 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

Error: Cannot find any information on property

 
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error :
org.apache.jasper.JasperException: Cannot find any information on property 'TheName' in a bean of type 'cool.Person'

I want my jsp to be able to get and set "TheName" string of my bean. Please tell me how to do this. The code i tried is shown below :

Bean


JSP


The DD seems to be ok, so i will not put it now.
 
Ranch Hand
Posts: 77
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Please change
private String TheName = "default";

to

private String theName = "default";
Because, java bean property should start with lower case.
 
Rahul Sudip Bose
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the clue Imran. Progress had stopped because of a small alphabet . But i found some new things and i want to be 100% sure about this capital-small issue.

Your answer needs correction (see the code below)
The property of jsp must begin with small alphabet - the bean can have 1st alphabet capital.
Now looking at this - there is one more possibility - what if i have fields in bean : theName and TheName and corresponding getter and setters. Which one will be used by jsp - theName ? Why did they make this restriction on 1st alphabet ???

This works :
jsp - theName

class-


 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's the way Java beans work. Please read up on beans.
 
reply
    Bookmark Topic Watch Topic
  • New Topic