This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Managed bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply 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: 14475
    
    7

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
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: 14475
    
    7

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 agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Managed bean
 
Similar Threads
<spring:nestedPath> and <spring:bind>
Problem in updating data to Oracle database in servlets
Casting Exception
Problem in delete form
Access Error = EJB + Glassfish + Netbeans