• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

javax.el.PropertyNotFoundException: in the JSP page of a Spring MVC Application

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 tables in the database (airports and stopovers).
I wrote a SQL join query get a result set that has fields from both the tables.
In order to map the result, i created a Custom object 'VbResult'. (There is no table in the DB corresponding to this domain object)

Please find below code for Domain object, Controller and the View:
When i invoke the home page i get the exception, though i have the field ressrc in VbResult class.

(or) Is it wrong to use a custom object as VbResult - just for the sake of View , for which no table exists?

I am stuck for a long time.. What is that I am missing here! Please let me know!

Thanks in advance

javax.el.PropertyNotFoundException: Property 'ressrc' not found on type com.datacaliper.vbuddy.domain.VbResult

Domain Object: VbResult



Controller Code



JSP Page

 
author
Posts: 396
8
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see a getRessrc() method on VbResult. I see a getSource() method that returns the ressrc property, but in the crazy mixed up world of JavaBeans, a property isn't a property if it doesn't have a corresponding getter method...in this case getRessrc().
 
meera harikrishna
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks much for the quick reply, Craig!! That saved a lot of time!

I kept changing my property names and missed this !
 
Ranch Hand
Posts: 206
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't manually coded, if you use Eclipse just right click, select "Source" from there you can generate Getters & Setters methods automatically. You can even generate toString(), hashCode(), and equalsJ() methods.

Let's Eclipse do all the hard work and weed out all typo error, use it to it full potential.



 
meera harikrishna
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh That was even easier.. ! Thanks
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!