I have a javax.el.PropertyNotFoundException accessing from a jsp page to an object mapped with @ModelAttribute.
I have the following (simplified) code
And in the jspxCode:@ModelAttribute("homePage") public HomePage populateHomePage(HttpServletRequest request) { homePage.setName("x"); homePage.setSurname_1("y"); homePage.setSurname_2("z"); return homePage; } @ModelAttribute("HelloWorld") public String populateHelloWorld(HttpServletRequest request) { return "HelloWorld"; }
The HelloWorld attribute works ok, but I can't access to the property "Name" on "homePage" objectCode:<p>${homePage.Name}</p> <p>${HelloWorld}</p>
The object "homepage" contains the following code:
The error raised is:Code:private String Name; public String getName() { return Name; }
javax.el.PropertyNotFoundException: Property 'Name' not found on type com.foo.bar.domain.HomePage
What is the correct way to access to homePage.Name?


Reply With Quote
