You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-user@portals.apache.org by tom tom <j_...@yahoo.com> on 2006/03/17 06:04:59 UTC
Http or Portlet
Hi,
I have the following question that is when sharing
information across should we make make use of the
typical servlet components (HttpSession,
ServletContext) or Portlet objects like
(PortletSession, PortletContext).
Is one way is recommended than the other. Is it still
all right to store the information in HttpSession and
ServletContext
for e.g inside the execute method of the action class
we can do the following
request.getSession().setAttribute("userId","userONe");
request.getSession().getServletContext().setAttribute("GlobalVar","INIT");
Similarly we can do the following in the action class
as follows
ActionRequest actionReques =(ActionRequest)
request.getAttribute("javax.portlet.request");
actionRequest.getPortletSession().setAttribute("userId","userONe");
actionRequest.getPortletSession().getPortletContext().setAttribute("GlobalVar","INIT");
waiting for a reply
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-user-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-user-help@portals.apache.org