Session ID

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Session ID

assafn
Hi,

I am trying to obtain the session id. Alas, I need it already at the first request to the server (no redirects). Therefore, the request does not yet have the requested-session-id in the header. The server naturaly holds the session_id.

Is there a quick way to obtain the session id without having to write a java bean to do so?

Thanks,

Assaf



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Session ID

Alessandro  Vernet
Administrator
Hi Assaf,

The standard way of dealing with the session in OPS is to use the
scope processors (link to documentation below). You can use the scope
serializer to store a document in the session and the scope generator
to retrieve it. Would those processors work for the use case you have
in mind?

http://www.orbeon.com/ops/doc/processors-serializers

Alex

On 7/28/06, [hidden email] <[hidden email]> wrote:

> Hi,
>
> I am trying to obtain the session id. Alas, I need it already at the first request to the server (no redirects). Therefore, the request does not yet have the requested-session-id in the header. The server naturaly holds the session_id.
>
> Is there a quick way to obtain the session id without having to write a java bean to do so?
>
> Thanks,
>
> Assaf
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Session ID

assafn
Hi Alex,

I don't think they will solve the problem. I need to
get the session id (automatically generated by the app
server - tomcat on the first request). Since this is
the first reqest the session id has not been sent to
the browser and therefore will not be included in the
request header. It is usually available by querying
the Session object:

HttpSession.getId();

I do not know how to access the HttpSession from OPS.

Thanks,

Assaf

--- Alessandro Vernet <[hidden email]> wrote:

> Hi Assaf,
>
> The standard way of dealing with the session in OPS
> is to use the
> scope processors (link to documentation below). You
> can use the scope
> serializer to store a document in the session and
> the scope generator
> to retrieve it. Would those processors work for the
> use case you have
> in mind?
>
> http://www.orbeon.com/ops/doc/processors-serializers
>
> Alex
>
> On 7/28/06, [hidden email] <[hidden email]>
> wrote:
> > Hi,
> >
> > I am trying to obtain the session id. Alas, I need
> it already at the first request to the server (no
> redirects). Therefore, the request does not yet have
> the requested-session-id in the header. The server
> naturaly holds the session_id.
> >
> > Is there a quick way to obtain the session id
> without having to write a java bean to do so?
> >
> > Thanks,
> >
> > Assaf
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the
> [hidden email] mailing list.
> > To unsubscribe:
> mailto:[hidden email]
> > For general help:
> mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
> >
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe:
> mailto:[hidden email]
> For general help:
> mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Session ID

Ross Horne
Since it's an HTTP header you could try the request generator:
http://www.orbeon.com/ops/doc/processors-generators-request

with configuration

<config>
 <include>/request/headers/header[name='cookie']/value</include>
</config>

Ross.

On 29/07/06, Assaf <[hidden email]> wrote:
Hi Alex,

I don't think they will solve the problem. I need to
get the session id (automatically generated by the app
server - tomcat on the first request). Since this is
the first reqest the session id has not been sent to
the browser and therefore will not be included in the
request header. It is usually available by querying
the Session object:

HttpSession.getId();

I do not know how to access the HttpSession from OPS.

Thanks,

Assaf

--- Alessandro Vernet <[hidden email]> wrote:

> Hi Assaf,
>
> The standard way of dealing with the session in OPS
> is to use the
> scope processors (link to documentation below). You
> can use the scope
> serializer to store a document in the session and
> the scope generator
> to retrieve it. Would those processors work for the
> use case you have
> in mind?
>
> http://www.orbeon.com/ops/doc/processors-serializers
>
> Alex
>
> On 7/28/06, [hidden email] <[hidden email]>
> wrote:
> > Hi,
> >
> > I am trying to obtain the session id. Alas, I need
> it already at the first request to the server (no
> redirects). Therefore, the request does not yet have
> the requested-session-id in the header. The server
> naturaly holds the session_id.
> >

> > Is there a quick way to obtain the session id
> without having to write a java bean to do so?
> >
> > Thanks,
> >
> > Assaf
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the
> [hidden email] mailing list.
> > To unsubscribe:
> mailto: [hidden email]
> > For general help:
> mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
> >
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe:
> mailto:[hidden email]
> For general help:
> mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws





--
+44 (0)7921 906 453 (mobile)
+44 (0)1573 225 400 (Kelso)

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Session ID

assafn
Hi Ross (and thanks),

The session id is not in the header until the second
request from the client and therefore cannot be read.
It is however stored in the app server session as
HttpSession.getId(). I just don't know how to get it
in an XPL.

Assaf

--- Ross Horne <[hidden email]> wrote:

> Since it's an HTTP header you could try the request
> generator:
>
http://www.orbeon.com/ops/doc/processors-generators-request
>
> with configuration
>
> <config>
>
>
<include>/request/headers/header[name='cookie']/value</include>

> </config>
>
> Ross.
>
> On 29/07/06, Assaf <[hidden email]> wrote:
> >
> > Hi Alex,
> >
> > I don't think they will solve the problem. I need
> to
> > get the session id (automatically generated by the
> app
> > server - tomcat on the first request). Since this
> is
> > the first reqest the session id has not been sent
> to
> > the browser and therefore will not be included in
> the
> > request header. It is usually available by
> querying
> > the Session object:
> >
> > HttpSession.getId();
> >
> > I do not know how to access the HttpSession from
> OPS.
> >
> > Thanks,
> >
> > Assaf
> >
> > --- Alessandro Vernet <[hidden email]> wrote:
> >
> > > Hi Assaf,
> > >
> > > The standard way of dealing with the session in
> OPS
> > > is to use the
> > > scope processors (link to documentation below).
> You
> > > can use the scope
> > > serializer to store a document in the session
> and
> > > the scope generator
> > > to retrieve it. Would those processors work for
> the
> > > use case you have
> > > in mind?
> > >
> > >
> http://www.orbeon.com/ops/doc/processors-serializers
> > >
> > > Alex
> > >
> > > On 7/28/06, [hidden email] <[hidden email]>
> > > wrote:
> > > > Hi,
> > > >
> > > > I am trying to obtain the session id. Alas, I
> need
> > > it already at the first request to the server
> (no
> > > redirects). Therefore, the request does not yet
> have
> > > the requested-session-id in the header. The
> server
> > > naturaly holds the session_id.
> > > >
> > > > Is there a quick way to obtain the session id
> > > without having to write a java bean to do so?
> > > >
> > > > Thanks,
> > > >
> > > > Assaf
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > You receive this message as a subscriber of
> the
> > > [hidden email] mailing list.
> > > > To unsubscribe:
> > > mailto:[hidden email]
> > > > For general help:
> > > mailto:[hidden email]?subject=help
> > > > ObjectWeb mailing lists service home page:
> > > http://www.objectweb.org/wws
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Blog (XML, Web apps, Open Source):
> > > http://www.orbeon.com/blog/
> > >
> > > >
> > > --
> > > You receive this message as a subscriber of the
> > > [hidden email] mailing list.
> > > To unsubscribe:
> > > mailto:[hidden email]
> > > For general help:
> > > mailto:[hidden email]?subject=help
> > > ObjectWeb mailing lists service home page:
> > > http://www.objectweb.org/wws
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the
> [hidden email] list.
> > To unsubscribe:
> mailto:[hidden email]
> > For general help:
> mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> +44 (0)7921 906 453 (mobile)
> +44 (0)1573 225 400 (Kelso)
> >
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe:
> mailto:[hidden email]
> For general help:
> mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Session ID

Ryan Puddephatt
Assaf,
        You could probably write a simple processor to give you this, or use
the unsafe-xslt processor and create a java function that can return the
value

Ryan

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108

 

>-----Original Message-----
>From: Assaf [mailto:[hidden email]]
>Sent: 31 July 2006 12:03
>To: [hidden email]
>Subject: Re: [ops-users] Session ID
>
>Hi Ross (and thanks),
>
>The session id is not in the header until the second request
>from the client and therefore cannot be read.
>It is however stored in the app server session as
>HttpSession.getId(). I just don't know how to get it in an XPL.
>
>Assaf
>
>--- Ross Horne <[hidden email]> wrote:
>
>> Since it's an HTTP header you could try the request
>> generator:
>>
>http://www.orbeon.com/ops/doc/processors-generators-request
>>
>> with configuration
>>
>> <config>
>>
>>
><include>/request/headers/header[name='cookie']/value</include>
>> </config>
>>
>> Ross.
>>
>> On 29/07/06, Assaf <[hidden email]> wrote:
>> >
>> > Hi Alex,
>> >
>> > I don't think they will solve the problem. I need
>> to
>> > get the session id (automatically generated by the
>> app
>> > server - tomcat on the first request). Since this
>> is
>> > the first reqest the session id has not been sent
>> to
>> > the browser and therefore will not be included in
>> the
>> > request header. It is usually available by
>> querying
>> > the Session object:
>> >
>> > HttpSession.getId();
>> >
>> > I do not know how to access the HttpSession from
>> OPS.
>> >
>> > Thanks,
>> >
>> > Assaf
>> >
>> > --- Alessandro Vernet <[hidden email]> wrote:
>> >
>> > > Hi Assaf,
>> > >
>> > > The standard way of dealing with the session in
>> OPS
>> > > is to use the
>> > > scope processors (link to documentation below).
>> You
>> > > can use the scope
>> > > serializer to store a document in the session
>> and
>> > > the scope generator
>> > > to retrieve it. Would those processors work for
>> the
>> > > use case you have
>> > > in mind?
>> > >
>> > >
>> http://www.orbeon.com/ops/doc/processors-serializers
>> > >
>> > > Alex
>> > >
>> > > On 7/28/06, [hidden email] <[hidden email]>
>> > > wrote:
>> > > > Hi,
>> > > >
>> > > > I am trying to obtain the session id. Alas, I
>> need
>> > > it already at the first request to the server
>> (no
>> > > redirects). Therefore, the request does not yet
>> have
>> > > the requested-session-id in the header. The
>> server
>> > > naturaly holds the session_id.
>> > > >
>> > > > Is there a quick way to obtain the session id
>> > > without having to write a java bean to do so?
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Assaf
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > You receive this message as a subscriber of
>> the
>> > > [hidden email] mailing list.
>> > > > To unsubscribe:
>> > > mailto:[hidden email]
>> > > > For general help:
>> > > mailto:[hidden email]?subject=help
>> > > > ObjectWeb mailing lists service home page:
>> > > http://www.objectweb.org/wws
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > > --
>> > > Blog (XML, Web apps, Open Source):
>> > > http://www.orbeon.com/blog/
>> > >
>> > > >
>> > > --
>> > > You receive this message as a subscriber of the
>> > > [hidden email] mailing list.
>> > > To unsubscribe:
>> > > mailto:[hidden email]
>> > > For general help:
>> > > mailto:[hidden email]?subject=help
>> > > ObjectWeb mailing lists service home page:
>> > > http://www.objectweb.org/wws
>> > >
>> >
>> >
>> > __________________________________________________
>> > Do You Yahoo!?
>> > Tired of spam?  Yahoo! Mail has the best spam
>> protection around
>> > http://mail.yahoo.com
>> >
>> >
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> [hidden email] list.
>> > To unsubscribe:
>> mailto:[hidden email]
>> > For general help:
>> mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >
>> >
>> >
>>
>>
>> --
>> +44 (0)7921 906 453 (mobile)
>> +44 (0)1573 225 400 (Kelso)
>> >
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe:
>> mailto:[hidden email]
>> For general help:
>> mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection
>around http://mail.yahoo.com 
>
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Session ID

Erik Bruchez
Administrator
In reply to this post by assafn
Assaf,

The oxf:request processor will give you the requested session id, but it
will not produce the result of HttpSession.getId().

However I think that oxf:request would be the right place to query this
information.

-Erik

Assaf wrote:

> Hi Alex,
>
> I don't think they will solve the problem. I need to
> get the session id (automatically generated by the app
> server - tomcat on the first request). Since this is
> the first reqest the session id has not been sent to
> the browser and therefore will not be included in the
> request header. It is usually available by querying
> the Session object:
>
> HttpSession.getId();
>
> I do not know how to access the HttpSession from OPS.
>
> Thanks,
>
> Assaf
>
> --- Alessandro Vernet <[hidden email]> wrote:
>
>> Hi Assaf,
>>
>> The standard way of dealing with the session in OPS
>> is to use the
>> scope processors (link to documentation below). You
>> can use the scope
>> serializer to store a document in the session and
>> the scope generator
>> to retrieve it. Would those processors work for the
>> use case you have
>> in mind?
>>
>> http://www.orbeon.com/ops/doc/processors-serializers
>>
>> Alex
>>
>> On 7/28/06, [hidden email] <[hidden email]>
>> wrote:
>>> Hi,
>>>
>>> I am trying to obtain the session id. Alas, I need
>> it already at the first request to the server (no
>> redirects). Therefore, the request does not yet have
>> the requested-session-id in the header. The server
>> naturaly holds the session_id.
>>> Is there a quick way to obtain the session id
>> without having to write a java bean to do so?
>>> Thanks,
>>>
>>> Assaf
>>>
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>>> To unsubscribe:
>> mailto:[hidden email]
>>> For general help:
>> mailto:[hidden email]?subject=help
>>> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>>>
>>>
>>
>> --
>> Blog (XML, Web apps, Open Source):
>> http://www.orbeon.com/blog/
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe:
>> mailto:[hidden email]
>> For general help:
>> mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com 
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws