Foren

WSRP & Ajax - Session not sent

Olivier Uytterhaegen, geändert vor 11 Jahren.

WSRP & Ajax - Session not sent

New Member Beitrag: 1 Beitrittsdatum: 16.10.12 Neueste Beiträge
Hi,

I made a simple portlet which is adding some values in the user session. This portlet also let the user display the session content by an Ajax hit (via the portlet serveResource).
All of this is working fine when the portlet is deployed on the server but it isn't working while using WSRP.

Steps to reproduce:
0. You will need 2 Liferay instances (Liferay 6.1 GA2 CE / tomcat 7.0.23): 1 producer & 1 consumer
1. Deploy the attached portlet Test_WSRP_Plugin-portlet-6.1.0.1 on the producer and add it to any page
2. Try to add some attributes into the session and check that they appear in the attributes list AND in the popup which appear when clicking on "Fetch Session"
3. Add a WSRP producer and share the portlet
4. On your 2nd liferay instance, add a WSRP consumer (make sure you use 127.0.0.1 and not localhost, otherwise you won't have any static resources) and add the portlet
5. Add the WSRP portlet to any page and try the same scenario described in 2.

You should notice that everything is working fine except when using the Ajax "Fetch Session" link.
This is because the user session is not sent to the producer while serving a resource.
Is it a known bug of the 6.1 GA1 ? Is it going to be fixed in a future version ?

Thanks for you help,
Olivier