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!

How to access a session scoped managed bean from a class

843844Feb 14 2008 — edited Feb 16 2008
Hi,

How to access a managed bean from a different class. say we have a managed bean class entry like this:
<managed-bean>
    <managed-bean-name>loginController</managed-bean-name>
    <managed-bean-class>LoginController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
I want to access this loginController instance from another class, say from ChangeUserPasswordConroller, and access the bean properties which have been previously set.

To be more precise..

LoginController has a property called userID.. how do I get this userID from ChangeUserPasswordController class?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2008
Added on Feb 14 2008
14 comments
438 views