Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF and session bean

843842Aug 3 2006 — edited Aug 26 2008
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2008
Added on Aug 3 2006
7 comments
630 views