« Return to Thread: How can I get hold of sessionbean1 in a servlet?

How can I get hold of sessionbean1 in a servlet?

by Jimmy200012 :: Rate this Message:

Reply to Author | View in Thread

Hi,

Say, I have a sessionbean1, which has bunch of cached rowsets. I have a servlet, I'd like to reuse the cached rowset in the sessionbean1. How can I get a reference of sessionbean1 so I can get the rowset?

tried this:
    FacesContext cont = FacesContext.getCurrentInstance();            
    SessionBean1 sessBean1 = (SessionBean1) cont.getExternalContext().getSessionMap().get("SessionBean1");

but won't work.

Thanks
Jimmy

 « Return to Thread: How can I get hold of sessionbean1 in a servlet?

LightInTheBox - Buy quality products at wholesale price!