• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Managed bean

 
Malika Ben Aziz
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks

I have this JavaBean :


and this jsp page:



and this is my faces-config.xml




I have this exception while trying to access my Javabean with that JSP :




Can you helop please?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You capitalized the package name ("Controller") in your faces-config file. Java is case-sensitive and package names should never contain upper-case letters.

Incidentally, a backing bean is not a Controller. Although it can contain some controller functions, it's primarily a Model. Most of the Controller logic in JSF is in the FacesServlet and the Tag implementations. Action Processors aren't controllers in the strict sense of the word. They're more of a business logic function with ties to the dispatcher.
 
Malika Ben Aziz
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:You capitalized the package name ("Controller") in your faces-config file. Java is case-sensitive and package names should never contain upper-case letters.

Incidentally, a backing bean is not a Controller. Although it can contain some controller functions, it's primarily a Model. Most of the Controller logic in JSF is in the FacesServlet and the Tag implementations. Action Processors aren't controllers in the strict sense of the word. They're more of a business logic function with ties to the dispatcher.


Thank you Tim, it was the the package!
Yes I agree, i shouldn't have put my beans in a package named controller.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Malika Ben Aziz wrote:
Yes I agree, i shouldn't have put my beans in a package named controller.


The reason I mentioned it is that you're not the only one I've seen doing that. I just wanted to get the word out before a lot of people get themselves all confused.

Or more confused, anyway...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic