Added request:get-session-id()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Added request:get-session-id()

Adam Retter-7

I have added a quick function to the XQuery request namespace called
It returns the ID of the current session or an empty sequence if there is no

Others may need this also, but I needed this functionality specificaly so
that -

I have some XQuery's that generate HTML pages, behind a username and
password login box (members only area), the session is used to secure the
pages and keep details of the logged in user etc.
I have a Java Applet embedded in the HTML generated by one of those
XQuery's, the applet needs to do a HTTP request to eXist to call a members
only XQuery. To access the members only XQuery from the Java Applet I have
to send the JSESSIONID in the HTTP Request and so I need to know the session
id. I set this using a <param name="sessionid"
value="{request:get-session-id()}"/> in the HTML code generated by the
xquery to load the applet.


Adam Retter

This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more.
Exist-open mailing list
[hidden email]