Woonsan Ko wrote:
> 
> I think it's not thread-safe but reliable for multiple users. A portlet
> session is based on the underlying servlet session which is unique per
> "user". So, it's reliable because other user cannot see the session
> attributes. However, if a user makes multiple requests and the requests
> trigger multiple threads, then multiple threads for the user can see the
> same session attribute.
> Anyway, I think it's reliable to store error information into session in
> your case.
> By the way, according to portlet api javadoc for PortletSession interface,
> it says:
> 
> "All objects stored in the session using the APPLICATION_SCOPE must be
> available to all the portlets, servlets and JSPs that belongs to the same
> portlet application and that handles a request identified as being a part
> of the same session. Objects stored in the session using the PORTLET_SCOPE
> must be available to the portlet during requests for the same portlet
> window that the objects where stored from. Attributes stored in the
> PORTLET_SCOPE are not protected from other web components of the portlet
> application. They are just conveniently namespaced."
> 
> Therefore, I think you can use PORTLET_SCOPE instead of APPLICATION_SCOPE
> to avoid the session attribute conflicts among portlet windows.
> 

Thanks Woonsan for the information.  I appreciate the help you've provided
me so far for both Pluto and Jetspeed.  I tried to switch to
PortletSession.PORTLET_SCOPE for both the ZIP Code data and the error
message but the JSP doesn't seem to work with it--I have to use
APPLICATION_SCOPE still.

Regards,
Glen

-- 
View this message in context: 
http://www.nabble.com/Reliance-on-session.setAttribute%28%29-for-error-messages--tp24750541p24764030.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscr...@portals.apache.org
For additional commands, e-mail: jetspeed-user-h...@portals.apache.org

Reply via email to