Hi David, Oh Yes, you are right!! The servlet was indeed running under my webapp context, and not under jetspeed's context. Once the servlet was put into the jetspeed's context, the VM was able to read the attributes in the session. How did I miss that!!!! :O However, is there any way that I can put some attributes into the jetspeed session context, from a servlet running under my webapp's context? I do not want to add a custom servlet into Jetspeed's webapp as far as possible, and having a hook into jetspeed webapp's session context from my webapp would enable me to do that. Thanks and Regards, Srivathsan
-----Original Message----- From: David Sean Taylor [mailto:[EMAIL PROTECTED] Sent: Saturday, May 26, 2007 1:35 AM To: Jetspeed Users List Subject: Re: [Jetspeed 2.1] Reading session attributes from a Decorator's VM On May 25, 2007, at 12:14 AM, V C, Srivathsan wrote: > Hi All, > > I have a situation where my decorator's VM needs to read an attribute > that has been put into the HTTP session by one of my application's > servlets. > > I am not able to read the session attribute using any of the following > directives: > > $session.getAttribute("js_${jetspeed.CurrentFragment.Id} > _BreadCrumbHTML" > ) > $session.getAttribute("BreadCrumbHTML") > $request.getSession().getAttribute("js_$ > {jetspeed.CurrentFragment.Id}_Br > eadCrumbHTML") > $request.getSession().getAttribute("BreadCrumbHTML") > > I tried implementing Vitaly's solution from an earlier thread, but it > does not work either :-( > > Can anyone help with this problem? What is the right way to read > attributes stored in the HttpSession from a decorator's VM file? > When you say "one of my application's servlets", where is this servlet? Is the servlet in the jetspeed webapp, or is the servlet in another web application? You know that two different servlet applications cannot share the same session attributes. There is a Tomcat-specific feature to get around that, but its not really recommended without good reason. Let me also suggest that Jetspeed has several ways to integrate with the production of portal content. 1. Pipeline Processing and Valves: Jetspeed has the ability to hook into the request processing pipeline of Jetspeed with custom "valves" 2. Request Context Objects (available in 2.1.1 only) Objects that can be put into the request via Spring configuration If you can tell me a little more about your servlet application, then I can better describe a solution ... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
