File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes  Unable to create managed bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark " Unable to create managed bean" Watch " Unable to create managed bean" New topic
Author

Unable to create managed bean

Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

My project was working fine..But suddenly it started to give this error




checked my managed beans..they are as same as they were in previous...Please help...!
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

You need to post up some code, there's too much left to the imagination here. Are you using @ManagedProperty? and if so
has the property got a setter method?

Regards,
Brendan.
Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

i am using faces-config.xml

my code

Logn.xhtml




LoginBean.java




faces-config.xml


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

You have violated a whole raft of JSF constraints and conventions, not to mention my own personal rule that unless you want your webapp to be hacked and pwned, you should never write login code at all (use the appserver's security system, instead).

I do not see a package name on your bean source code. You are referring to an instance of the bean using a name that begins with an upper-case letter (Classnames begin with upper-case, instance names begin with lower-case). And you are referring to transient JSF constructs in a context as though they had long-term existence (Note: the more references you make to javax.faces objects in your code, the more likely you're doing in wrong, except for model objects). Also you need to study on how backing bean action methods and navigation work.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to create managed bean