Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Spring and the fly likes javax.el.PropertyNotFoundException: in the JSP page of a Spring MVC Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "javax.el.PropertyNotFoundException: in the JSP page of a Spring MVC Application" Watch "javax.el.PropertyNotFoundException: in the JSP page of a Spring MVC Application" New topic
Author

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

meera harikrishna
Greenhorn

Joined: Mar 18, 2011
Posts: 5
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

Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
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().


Spring in Action - Unleash POJO power in your applications!
Modular Java - Discover the secret weapon to modularity on the Java platform!
XDoclet in Action - Your complete guide to code generation with XDoclet.
meera harikrishna
Greenhorn

Joined: Mar 18, 2011
Posts: 5
Thanks much for the quick reply, Craig!! That saved a lot of time!

I kept changing my property names and missed this !
Tommy Delson
Ranch Hand

Joined: Apr 13, 2011
Posts: 206
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.




OCPJP6-05-11
"Your life is in your hands, to make of it what you choose."
meera harikrishna
Greenhorn

Joined: Mar 18, 2011
Posts: 5
Oh That was even easier.. ! Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.el.PropertyNotFoundException: in the JSP page of a Spring MVC Application
 
Similar Threads
New value is inserted into db in @ManyToOne relation instead of update
Maintain checked checkbox status
how to map list of object from jsp to command object in spring
reCaptcha issue with Spring MVC
help me in this JSP checkbox code