I'm trying to share some information between a portlet and a servlet. Both are
deployed in the same portlet app (WAR).
I want a portlet to produce binary content. since that is not possible in a
direct way, I use the portlet to create an image tag that points to a servlet
that actually provides the binary content. However, the image is rendered
based on the portlets preferences, so I have to either share those preferences
with the servlet, or create the image in the portlet, and share it with the
servlet, so that the servlet can stream it back to the client.
ok, finally here is the issue:
If I write PortletSession.setAttribute("key", image,
PortletSession.APPLICATION_SCOPE);
there is nothing in the http session by the time the servlet responds to the
image request.
If I set a session value with APPLICATION_SCOPE, and then dispatch to a servlet
(PorteltRequestDispatcher.include), I can get the session value just fine.
What I noticed is that the session id's match in the case where I use the
portlet request dispatcher. In the other case (portlet causes a second request
to retrieve the image), the session id's don't match.
Shouldn't I get the same HttpSession while I'm in the same WAR, regardless of
access via a portlet or a servlet ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867671#3867671
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867671
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development