G
gbattine
Hi guys,
i've a question for you. I'm developing a jsf application.
I need to store data inserted in login by user into a session,to
retrieve them in other pages and to delete them when user log out.
How can i do it?
I've read about this problem and i've understood there are 2
possibilities,using servlet and directly JSF.
1) What is good and bad in these 2 possibilities?
2) i've a function login,i perform authentication and later i've tried
to create an user object with login attributes and to store it into a
session,but i'm not able to go on...
User user=new User();
user.setLogin(loginName);
user.setTeamname(teamName);
user.setLoggedIn(true);
Session session = (Session)
FacesContext.getCurrentInstance().getExternalContext().getSession(true);
can someone help me on how inserting user object into session?
Once i've done it,if a user try in the same time to log in with same
values,how can i test if a user with its data is yet navigating in the
application?
Thanks very much
i've a question for you. I'm developing a jsf application.
I need to store data inserted in login by user into a session,to
retrieve them in other pages and to delete them when user log out.
How can i do it?
I've read about this problem and i've understood there are 2
possibilities,using servlet and directly JSF.
1) What is good and bad in these 2 possibilities?
2) i've a function login,i perform authentication and later i've tried
to create an user object with login attributes and to store it into a
session,but i'm not able to go on...
User user=new User();
user.setLogin(loginName);
user.setTeamname(teamName);
user.setLoggedIn(true);
Session session = (Session)
FacesContext.getCurrentInstance().getExternalContext().getSession(true);
can someone help me on how inserting user object into session?
Once i've done it,if a user try in the same time to log in with same
values,how can i test if a user with its data is yet navigating in the
application?
Thanks very much