Two scopes in jsr168 spec, one is portlet scope and another is app scope.

When you put attribute into portletsession without any scope, the
default scope of that attribute is portlet scope.  Some portal
implementation will prefix or append some unique id of that portlet to
the attribute key, so if you need to access that attribute outside a
portlet, you need first to know the modified key (this method is
rarely used).

When you get attribute from portletsession, jsr 168 spec indicated the
following orders:
1. check portlet scope of the given key (of course, will generate the
unique key first)
2. if not found the key, check app scope.

We currently find some hack keys. if a key is start with "javax." or
"java.", some portal implementation (pluto, i currenly use) will skip
prefix or append string to the key. it is a just  work around, not a
good soluction.

Hope above helps you.

Regards.

On Thu, 13 Jan 2005 10:13:48 -0800, LaCasse, John <[EMAIL PROTECTED]> wrote:
> Thanks for the response. This works if I'm including the jsp via the
> PortletRequestDispatcher but in my case I'm redirecting to the jsp in
> which case these attributes aren't there. In Weblogic and WebSphere if
> you put an attribute in the PortletSession it is also accessible via the
> standard HttpServletSession which the jsr168 spec dictates it should be.
> I believe I read some documentation that indicated that the
> PortletSession actually uses the HttpServletSession but for some reason
> I'm seeing a different session id when I redirect to a jsp.
> 
> Jpl
> 
> -----Original Message-----
> From: Liang Chen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 12, 2005 6:47 PM
> To: Jetspeed Developers List
> Subject: Re: HttpSession -vs- PortletSession
> 
> To get PortletSession in jsp:
> <%
> PortletRequest portletRequest = (PortletRequest)
> request.getAttribute("javax.portlet.request");
> 
> PortletSession portletSession = portletRequest.getPortletSession()
> %>
> 
> On Wed, 12 Jan 2005 14:33:10 -0800, LaCasse, John <[EMAIL PROTECTED]>
> wrote:
> > According to the JSR168 spec everything that gets stored into the
> > PortletSession should also be stored in the HttpSession. When I access
> > the HttpSession via a regular jsp page it has a different session id
> > that the PortletSession and hence is a different session. Has anyone
> had
> > this problem or know how I can get access to the PortletSession
> session
> > from a standard jsp page.
> >
> > Thanks for any help,
> > Jpl
> >
> >
> 
> --
> Liang Chen
> in Shanghai, China
> 
> ---------------------------------------------------------------------
> 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]
> 
> 


-- 
Liang Chen
in Shanghai, China

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to