You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "LaCasse, John" <JL...@filenet.com> on 2005/01/12 23:33:10 UTC

HttpSession -vs- PortletSession

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

Re: HttpSession -vs- PortletSession

Posted by Ken Ramirez <kr...@TheJavaThinkTank.org>.
Actually, instead of retrieving the attribute, play it safe and use the tag:

<portlet:defineObjects/>

<%
PortletSession ps = renderRequest.getPortletSession();
%>

Both solutions should get you there.


Ken


Liang Chen wrote:

>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 <JL...@filenet.com> 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
>>
>>
>>    
>>
>
>
>  
>

-- 
*----*----*----*----*----*----*----*----*----*----*----*----
Stay on top of all things to do with JSR-168 Portlet and
Portal development by bookmarking the authority on the
subject: http://community.java.net/portlet
*
* News
* Weblogs
* Community Tips
* Portlet and Portal Projects
* Featured Articles
* And much more
*
*----*----*----*----*----*----*----*----*----*----*----*----
Ken Ramirez
Send mail to: mailto://kramirez@TheJavaThinkTank.org
Check out the website: http://www.TheJavaThinkTank.org
Check out my Blog at: http://weblogs.java.net/blog/ken_ramirez
*----*----*----*----*----*----*----*----*----*----*----*----


Re: HttpSession -vs- PortletSession

Posted by Liang Chen <la...@gmail.com>.
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 <JL...@filenet.com> 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: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org