Unable to retrive the browser session inforamtion after send event?

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

Unable to retrive the browser session inforamtion after send event?

Rahul
I have deployed the proxy portlet on liferay portal. After form submission I need to get the default browser session information. The following link, http://wiki.orbeon.com/forms/how-to/logic/store-xml-in-the-session says about set and get attributes of the session. I don't want to set the session attribute instead I want to get the default browser session information. How can we do that? I tried to get the default session info using xxforms:get-session-attribute() but it is not working. Any suggestion, How can I access the browser session information.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Alessandro  Vernet
Administrator
Hi Rahul,

What do you mean by "default browser session information"? xxf:get-session-attribute() returns session attributes, and here "session" refers to the session the servlet or portlet container created.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Rahul
Hi Alex,

Thank you for your response. Browser default session information mean, I don't want to set any session attributes. But want to get some default session information like, SessionID, request ID and any other possible information.

I have enabled session listeners so I am able to get session details in log file. But I also need to get the session details in the form. How can I get those details in the form let's say in contact (or) bookself form?

My exact problem is, I am using proxy portlet which is deployed on life ray portal. On click of send button in the proxy portlet, I am sending my form details to some other portlet and it is send successfully. But after sending the form I need to get the default session information.
 
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Rahul
Hi Alex,

The following link explain the session handling, http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications.

Where one of the statement says that,

Always create a session in your code, e.g. with request.getSession(), even if you're not going to store anything in that session.

I need the same way, I don't want to store any thing in the session. But I need to get the session default info.

How can I use request.getSession() method?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Alessandro  Vernet
Administrator
Hi Rahul,

And you would like to get the request id from XPath? That information isn't exposed through a function at this point. I imagine that you could get to that information using Saxon's ability to call Java code from XPath (see link below), but it might be painful to write, and you would have to learn about Orbeon's abstraction API for requests and sessions (ExternalContext.Request). But I'm curious: what is your use case warrants using the request id?

http://www.saxonica.com/documentation9.1/extensibility/functions.html

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Rahul
This post was updated on .
Hi Alex,

Thank you for suggestion I will look into it for sure. Other than that If I edit proxy portlet file (scala) file is there any chance to get the session information?  Because I need to get the session info once the send event has occurred.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Erik Bruchez
Administrator
Rahul,

The session seen by the proxy portlet will be different from the session seen by the form running within Form Runner. That's because the proxy portlet is that, a proxy, and connects to Form Runner via HTTP.

You can see that if you use an HTTP monitor/logger: the JSESSIONID sent by your browser to Liferay will be different from the JSESSIONID sent by the proxy portlet to Form Runner.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Unable to retrive the browser session inforamtion after send event?

Rahul
Hi Erik,

How can I use and view the HTTP monitor/logger to compare the JSESSIONID's?