-
1. Re: How to pass value by session between portlet and servlet in Gatein
nicola.seidita Jul 22, 2011 5:38 AM (in response to joey_wang)Too much replies....anyone could help?
-
2. Re: How to pass value by session between portlet and servlet in Gatein
trong.tran Jul 22, 2011 7:13 AM (in response to joey_wang)you meant the servlet configured in the portlet web applicatoin itself ?
-
3. Re: How to pass value by session between portlet and servlet in Gatein
nicola.seidita Jul 28, 2011 10:15 AM (in response to joey_wang)I mean somenthing like sharing session to access the attribute
-
4. Re: How to pass value by session between portlet and servlet in Gatein
vstorm83 Jul 29, 2011 12:27 AM (in response to nicola.seidita)There are 2 cases :
1. If your servlet is in the same webapp with your portlet. You can save objects to PortletSession using PortletSession.APPLICATION_SCOPE, and in Servlet, you can call HttpSession.getAttribute method to retrieve shared objects
2. If they are in difference webapps, you have to write a delegate portlet in the same webapp with your servlet. Use the PorltetEvent to pass object to this delegate portlet, and now, you can share object just like you do in the Case1
-
5. Re: How to pass value by session between portlet and servlet in Gatein
hoang_to Jul 31, 2011 10:48 PM (in response to joey_wang)Another way is to build a custom PortletInvokerInterceptor in PC which deals with:
1. Store object as attribute in HttpSession and portlet session
2. Marshalled/Unmarshalled object to make it conform with webapp class loader