|
Home > Archive > WebSphere Portal Server > April 2004 > Passing the Session from the Portlet Session to the Http Session
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Passing the Session from the Portlet Session to the Http Session
|
|
| bongsuyo 2004-04-11, 10:36 pm |
| Hi,
Is there a way to pass the portlet session to the http session? I tried casting the portlet session as http session but it gives me a Class Casting Exception error.
What I intend to do is to pass my session data from the portlet session to the http session, whereby, i can reuse the data.
Is this possible? Help is greatly appreciated. Thanks.
| |
|
| Hi bongsuyo,
I think your question is related to integrate normal web app with portal .
Looks no way share portletRequest session data (Paramters or Attributes)
with other web app's httpRequest session data, but if you deployed noraml
web app on WebSphere_Portal node, then
the sessionId value can be same (you can use it to do some sercurity work).
Other way, you also can write some servlet inside portlet war file.
Hope can help you a little.
"bongsuyo" <bongsuyo@firemail.de> wrote in message
news:484092820.1081734467083.JavaMail.wasadmin@swg3ws006...
> Hi,
>
> Is there a way to pass the portlet session to the http session? I tried
casting the portlet session as http session but it gives me a Class Casting
Exception error.
>
> What I intend to do is to pass my session data from the portlet session to
the http session, whereby, i can reuse the data.
>
> Is this possible? Help is greatly appreciated. Thanks.
| |
| bongsuyo 2004-04-12, 10:33 pm |
| hi alex,
thanks. actually, my servlet is inside the war file. but since the servlet is using HttpRequest and HttpResponse, i can't seem to be able to pass the session from the portal on it.
I was hoping i could just pass my session beans from the portlet to the servlet, but seems like to no avail, or, is there a workaround on this, to pass the session data to the servlet that resides to the same war file?
thanks for the help.
| |
| Michael Harris 2004-04-14, 2:10 pm |
| Passing Java objects from a portlet to a servlet through a session object
(even in the same .war file) is not supported for portlets written using the
IBM portlet API. Some people have posted code snippets here in the past
that use undocumented API to enable you to do this. However, the snippets
are different for each version of WPS and sometimes different for various
fixpacks or e-fixes on a particular version.
Your other choices are to use the servlet context, request parameters, your
own cache somewhere, and others. All of these techniques have limitations
in security, clustering, or deployment and configuration.
|
|
|
|
|