[jboss-user] [JBoss Portal] - LayoutStrategy HttpSession and PortletSession with APPLICATI

klj62 do-not-reply at jboss.com
Thu Jan 11 13:52:02 EST 2007


We are currently using the JBoss Portal 2.2.1SP3 Bundle and are attempting to set a session attribute in a portlet for access by a layout strategy, which has access to the HttpSession.

Yes, we've read the spec and are using APPLICATION_SCOPE.  Both the layout strategy class and the portlet class are deployed in the same web app.  The Portlet code is:

    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) 
  |     	throws PortletException
  |     {
  |     	PortletSession ps = actionRequest.getPortletSession();
  |     	ps.setAttribute( "portletAction", "MyPortletInfo", PortletSession.APPLICATION_SCOPE );
  |     }
  | 

Then the Strategy code called immediately after is:

   public StrategyResponse evaluate(StrategyContext context) 
  |              throws StrategyException
  |    {
  | 	   HttpServletRequest request = context.getHttpServletRequest();
  | 	   HttpSession session = request.getSession();
  | 
  | 	   String portletAction = (String)session.getAttribute("portletAction");
  |            . . . .
  |     }
  | 

The attribute is not found.  We've printed all attributes available from the HttpSession, and the "portletAction" set in the PortletSession is not found, regardless of the scope used.

Are there any versions of Jboss/Tomcat that do not properly propagate PortletSession attributes to the HttpSession?  Is the Strategy called by some external HttpSession to the one used by the portlets?  Are there configuration parameters that do not default to work according to the JSR168 spec?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000573#4000573

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000573



More information about the jboss-user mailing list