JSF and session bean
843842Aug 3 2006 — edited Aug 26 2008Hi to evaryone,
I've a jsf page with a session scoped bean, this is the config of the bean in faces-config:
<managed-bean>
<managed-bean-name>userBean</managed-bean-name>
<managed-bean-class>admin.userBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
i'm using this bean in a page called datiPersonali.jsf
before i call this page i call a servlet, in this servlet i'm select soma data from DB ad i'm load this data in the bean and i'm save the bean in a session variable, the code is this:
//load data from DB to bean
bean = utilBean.getDataFromDB(user);
//put the bean in a session variable called like managed bean
request.getSession().setAttribute("userBean", bean);
//redirect to jsf page
response.sendRedirect("/admin/user.jsf");
So when the page is diplayed the input text dosen't contain the value, why? In jsp page this function great, how i can solve this problem?
Thanks in advance,
Fabio.