2 Replies Latest reply on Mar 8, 2009 9:24 PM by Tom Schaible

    Accessing JBossPortletRequest/HTTPServletRequest in Portal 2

    Tom Schaible Newbie

      Hello everyone,

      We have a use case where we need a portlet to present an iframe to an existing home-grown PHP application and do SSO between the two applications. We're on a short timeline, so changes the existing PHP app to support some more robust form of SSO are not an option at the moment.

      I have been able to accomplish this outside the portal context by populating the PHP session db tables in the background and setting an appropriate cookie. (apps are on different sub-domains of the same domain, so this should be fine)

      Inside the portal however, I cannot access the HTTPServletRequest/Response to grab IP information and to set cookies.

      I have seen several posts recommendeding that i grab the JBossPortletRequest and do the following


      This seems to work fine in Portal 2.6.x, but on the 2.7.x releases, the request comes back as an org.jboss.portal.portlet.impl.jsr168.api.RenderRequestImpl which cannot be cast to a JBossPortletRequest.

      Understandably the 168 spec does not allow access to the base HTTP Request/Response, but is there a way in Portal 2.7.x to still access these objects outside of the 168 spec? It was available in 2.6 and would be a nice to have in 2.7 with the understanding that any portlets using those specific api calls would not be portable.