Hi, I am getting into
JSF.. or rather not. I am trying to write a simple Application, but I just cannot get it to work. If anyone looks over this, I thank you for your time in advance!
I deploy on Jetty and my JSF-Engine is MyFaces, though I doubt that it matters.
I try to write a simple "Guestbook" application which allows an own guestbook for every user, which only he can access.
I managed to write a "NewEntry.jsp", and it works fine.
Classes I wrote:
Guestbook - Guestbook Entity, contains a Vector of...
GuestbookEntry - GuestbookEntry Entity, contains all the data of an entry as strings. I also used it as Backing Bean for adding a new Entry, dunno if that's good.. (but it worked)
User - A User (contains UserID and the username etc.)
GuestbookSvc - A managed application scope bean. So it should be Singleton..(?) manages login, holds user passwords, user guestbooks, etc.
LoginBean - A managed session scope bean. Bascially the backing bean for my login site + it should store if the user is logged in obviously
In the GuestbookSvc constructor I create some dummy data.
Now, as you can see I need the LoginBean to access the instance of GuestbookSvc. As I have no factory class, I inject it over a parameter.
Let me show you the managed beans in my faces-config.xml:
The GuestbookSvc is created succesfully, so there is no problem in that area.
Here is the code of my LoginBean:
My login-site (guestbook.jsp) looks like this:
(As you can see I actually access the guestbooksvc there, to retrieve my dummy users...)
Now, my looger says: LoginSvc: gbsvc is null. Anyone has a clue why gbsvc *is* null?
Thanks in advance,
sincerly yours
V. Rentschler