Another session problem :(
Hello Everybody,
I have an issue with session in JSF application where am using a Servlet filter .
When i code like this
servletconfig.getServletContext().setAttribute ("profile", profileObject);
Though object gets placed in session but later when i try to get it in my backing bean as below
Profile objProfile =(Profile) request.getAttribute("profile");
I donot get this object? Wondering why my session is lost.
On the other hand if i use following piece of code it works perfect.
ServletContext ctx = filterConfig.getServletContext();
LifecycleFactory lifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
Lifecycle lifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
FacesContextFactory factory =(FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
FacesContext context = factory.getFacesContext( (Object) ctx,(Object)objHttpServletRequest, (Object)objHttpServletResponse, lifecycle);
context.getExternalContext().getSessionMap().put("profile", profileObject);
Any reason why it is so? Am using RAD 6.0 and WAS6.0
Thanx.

