Two Laptop Bag
The moose likes JSF and the fly likes Managed bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Managed bean" Watch "Managed bean" New topic
Author

Managed bean

Malika Ben Aziz
Greenhorn

Joined: Oct 26, 2009
Posts: 23
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

Joined: Jun 25, 2001
Posts: 17038
    
  26

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.


An IDE is no substitute for an Intelligent Developer.
Malika Ben Aziz
Greenhorn

Joined: Oct 26, 2009
Posts: 23
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

Joined: Jun 25, 2001
Posts: 17038
    
  26

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...
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Managed bean
 
It's not a secret anymore!