You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Vogt, Burkhard" <Bu...@gmx.de> on 2006/09/21 21:08:16 UTC

two sessions within one request sequence?

Hi,

is it possible that jetspeed2 uses 2 different sessions within one 
request sequence?

I need to transfer data to a servlet, which is assembled by a portlet. 
For this
reason I dispatched the data to a jsp, which first attaches the data to 
the HttpSession
and then calls the servlet via an iframe tag. For some reason the 
session accessible
by the servlet does not receive the data due to a different session it uses.

This is necessary to integrate an external web application into the 
portal - unfortunately
jBoss and liferay are working well with this solution (I'm currently 
evaluating portals
for a customer...)

Thanks for any hints in advance!

Burkhard

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


Re: two sessions within one request sequence?

Posted by Burkhard Vogt <Bu...@gmx.de>.
Hi Brice,

thanks for that, it works!

Yesterday I searched in the mailing list archives too, found eventually
the same inforamtion as you did, but I don't know why I set it into the 
AJP connector...

Have a nice weekend.

Burkhard


-------- Original-Nachricht --------
Datum: Fri, 22 Sep 2006 09:35:38 -0500
Von: Brice Lambi <la...@gmail.com>
An: Jetspeed Users List <je...@portals.apache.org>
Betreff: Re: two sessions within one request sequence?

> Hi,
> 	See my post yesterday.  Basically you need to add
> emptySessionPath="true" to your connector element in your server.xml
> file (tomcat).  Then you can share session data between portlets and
> servlets.
> 
> My entry looks like this:
> 
> 
>  <Connector port="8080" maxHttpHeaderSize="8192"
>                maxThreads="150" minSpareThreads="25"
> maxSpareThreads="75"
>                enableLookups="false" redirectPort="8443"
> acceptCount="100"
>                connectionTimeout="20000" disableUploadTimeout="true"
> emptySessionPath="true"/>
> 
> 
> Brice
> 
> 
> On Thu, 2006-09-21 at 21:08 +0200, Vogt, Burkhard wrote:
> > Hi,
> > 
> > is it possible that jetspeed2 uses 2 different sessions within one 
> > request sequence?
> > 
> > I need to transfer data to a servlet, which is assembled by a portlet. 
> > For this
> > reason I dispatched the data to a jsp, which first attaches the data to 
> > the HttpSession
> > and then calls the servlet via an iframe tag. For some reason the 
> > session accessible
> > by the servlet does not receive the data due to a different session it
> uses.
> > 
> > This is necessary to integrate an external web application into the 
> > portal - unfortunately
> > jBoss and liferay are working well with this solution (I'm currently 
> > evaluating portals
> > for a customer...)
> > 
> > Thanks for any hints in advance!
> > 
> > Burkhard
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org

-- 
NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet!
Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl

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


Re: two sessions within one request sequence?

Posted by Brice Lambi <la...@gmail.com>.
Hi,
	See my post yesterday.  Basically you need to add
emptySessionPath="true" to your connector element in your server.xml
file (tomcat).  Then you can share session data between portlets and
servlets.

My entry looks like this:


 <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443"
acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
emptySessionPath="true"/>


Brice


On Thu, 2006-09-21 at 21:08 +0200, Vogt, Burkhard wrote:
> Hi,
> 
> is it possible that jetspeed2 uses 2 different sessions within one 
> request sequence?
> 
> I need to transfer data to a servlet, which is assembled by a portlet. 
> For this
> reason I dispatched the data to a jsp, which first attaches the data to 
> the HttpSession
> and then calls the servlet via an iframe tag. For some reason the 
> session accessible
> by the servlet does not receive the data due to a different session it uses.
> 
> This is necessary to integrate an external web application into the 
> portal - unfortunately
> jBoss and liferay are working well with this solution (I'm currently 
> evaluating portals
> for a customer...)
> 
> Thanks for any hints in advance!
> 
> Burkhard
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 


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


Re: two sessions within one request sequence?

Posted by Aaron Evans <aa...@gmail.com>.
Yes, I am connecting through Apache using the AJP connector.  I have
my HTTP connector of tomcat turned off.

On 9/23/06, Vogt, Burkhard <Bu...@gmx.de> wrote:
> Hi Aaron,
>
> I think it was your post, taht I read on thusrday. I tried that, but it
> doesn't work. May be it depends on the way yout access jetspeed (resp.
> tomcat). Currently I'm accessing jetspeed "directly", i.e. using the
> http connector of tomcat. Is your tomcat accessed via Apache (using the
> ajp connector)?
>
> Burkhard
>
>
> Aaron Evans wrote:
> > Firstly, in tomcat's conf/server.xml, add the emptySessionPath="true"
> > to your AJP connector.
> >
> > <Connector port="8009" protocol="AJP/1.3" emptySessionPath="true"/>
> >
> > Secondly, if you put stuff in the servlet session, to access it in a
> > portlet, make sure you use:
> >
> > renderRequest.getPortletSession().getAttribute("mySessionAttr",PortletSession.APPLICATION_SCOPE)
> >
> >
> > Similarly if setting the attribute in the portlet session and you want
> > to get at it from the servlet.
> >
> > Note that (if I am not mistaken) the portlet and servlet must be part
> > of the same web application...
> >
> > -aaron
> > -aaron
> >
> > On 9/21/06, Vogt, Burkhard <Bu...@gmx.de> wrote:
> >
> >> Hi,
> >>
> >> is it possible that jetspeed2 uses 2 different sessions within one
> >> request sequence?
> >>
> >> I need to transfer data to a servlet, which is assembled by a portlet.
> >> For this
> >> reason I dispatched the data to a jsp, which first attaches the data to
> >> the HttpSession
> >> and then calls the servlet via an iframe tag. For some reason the
> >> session accessible
> >> by the servlet does not receive the data due to a different session it
> >> uses.
> >>
> >> This is necessary to integrate an external web application into the
> >> portal - unfortunately
> >> jBoss and liferay are working well with this solution (I'm currently
> >> evaluating portals
> >> for a customer...)
> >>
> >> Thanks for any hints in advance!
> >>
> >> Burkhard
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> >> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

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


Re: two sessions within one request sequence?

Posted by "Vogt, Burkhard" <Bu...@gmx.de>.
Hi Aaron,

I think it was your post, taht I read on thusrday. I tried that, but it 
doesn't work. May be it depends on the way yout access jetspeed (resp. 
tomcat). Currently I'm accessing jetspeed "directly", i.e. using the
http connector of tomcat. Is your tomcat accessed via Apache (using the 
ajp connector)?

Burkhard


Aaron Evans wrote:
> Firstly, in tomcat's conf/server.xml, add the emptySessionPath="true"
> to your AJP connector.
> 
> <Connector port="8009" protocol="AJP/1.3" emptySessionPath="true"/>
> 
> Secondly, if you put stuff in the servlet session, to access it in a
> portlet, make sure you use:
> 
> renderRequest.getPortletSession().getAttribute("mySessionAttr",PortletSession.APPLICATION_SCOPE) 
> 
> 
> Similarly if setting the attribute in the portlet session and you want
> to get at it from the servlet.
> 
> Note that (if I am not mistaken) the portlet and servlet must be part
> of the same web application...
> 
> -aaron
> -aaron
> 
> On 9/21/06, Vogt, Burkhard <Bu...@gmx.de> wrote:
> 
>> Hi,
>>
>> is it possible that jetspeed2 uses 2 different sessions within one
>> request sequence?
>>
>> I need to transfer data to a servlet, which is assembled by a portlet.
>> For this
>> reason I dispatched the data to a jsp, which first attaches the data to
>> the HttpSession
>> and then calls the servlet via an iframe tag. For some reason the
>> session accessible
>> by the servlet does not receive the data due to a different session it 
>> uses.
>>
>> This is necessary to integrate an external web application into the
>> portal - unfortunately
>> jBoss and liferay are working well with this solution (I'm currently
>> evaluating portals
>> for a customer...)
>>
>> Thanks for any hints in advance!
>>
>> Burkhard
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 

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


Re: two sessions within one request sequence?

Posted by Aaron Evans <aa...@gmail.com>.
Firstly, in tomcat's conf/server.xml, add the emptySessionPath="true"
to your AJP connector.

<Connector port="8009" protocol="AJP/1.3" emptySessionPath="true"/>

Secondly, if you put stuff in the servlet session, to access it in a
portlet, make sure you use:

renderRequest.getPortletSession().getAttribute("mySessionAttr",PortletSession.APPLICATION_SCOPE)

Similarly if setting the attribute in the portlet session and you want
to get at it from the servlet.

Note that (if I am not mistaken) the portlet and servlet must be part
of the same web application...

-aaron
-aaron

On 9/21/06, Vogt, Burkhard <Bu...@gmx.de> wrote:
> Hi,
>
> is it possible that jetspeed2 uses 2 different sessions within one
> request sequence?
>
> I need to transfer data to a servlet, which is assembled by a portlet.
> For this
> reason I dispatched the data to a jsp, which first attaches the data to
> the HttpSession
> and then calls the servlet via an iframe tag. For some reason the
> session accessible
> by the servlet does not receive the data due to a different session it uses.
>
> This is necessary to integrate an external web application into the
> portal - unfortunately
> jBoss and liferay are working well with this solution (I'm currently
> evaluating portals
> for a customer...)
>
> Thanks for any hints in advance!
>
> Burkhard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

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