Thanks a lot !!! Was banging my head on this one since last 4 days !
Also, just a request to jetspeed developers -- This is an undocumented feature of jetspeed. Atleast I couldn't find it anywhere. If things around this can be added to somewhere in the "layout" documentation area, that could be very helpful ...
Thanks, Amit ----Original Message Follows---- From: "Prashanth Gujjeti" <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" <[email protected]> To: "Jetspeed Users List" <[email protected]> Subject: RE: J2 - Session shared between jetspeed and my portal ?? Date: Fri, 9 Sep 2005 10:24:02 -0700 Amit, The context (or the session object) shared between Jetspeed2 and the portlets is not the same. The way I am trying to workaround this issue is to use the RequestContext object from within my web-application and place a session variable from there. Following is a snippet from the login.jsp under ${CATALINA_HOME}\webapps\security\WEB-INF\security\login with the standard Jetspeed2 distribution. Here the getSessionAttribute() is being used. You can similarly set attributes. Any better approaches will be appreciated. ########## <[EMAIL PROTECTED] import="org.apache.jetspeed.login.LoginConstants"%> <[EMAIL PROTECTED] import="org.apache.jetspeed.request.RequestContext"%> ............... <td><fmt:message key="login.label.Username"/></td> <c_rt:set var="userName" value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_P ORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/> <td><input type="text" size="30" name="<%=LoginConstants.USERNAME%>" value="<c:out value="${userName}"/>"></td> ########## Thanks, Prashanth -----Original Message----- From: Shah Amit [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 9:09 AM To: [email protected] Subject: J2 - Session shared between jetspeed and my portal ?? Hi all, I am setting some attribute in session in my webapp. I am using Struts-Bridge, and I save the variabe in session with session.setAttribute("myVar", "myVal") Now in the decorators - decorator-macros.vm, I am trying to access the same variable from session through velocity code. $request.Session.Attribute("myVar") but it doesn't see my variable and simply spits out $request.Session.Attribute("myVar") instead of "myVal". Any suggestions ... Thanks, Amit --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
