Hello,
I am trying to get the HttpServletRequest from a RenderRequest (javax.portlet.RenderRequest). This is some existing code (running on Websphere Portal 5.1) that orginally was doing this:
HttpServletRequest request = (HttpServletRequest) renderRequest;
However, on Jboss Portal, This throws a ClassCastException:
java.lang.ClassCastException: org.jboss.portlet.JBossRenderRequest
So I tried this approach after a few Google searches:
HttpServletRequest request = (HttpServletRequest) renderRequest.getAttribute("javax.servlet.request");
No ClassCastException but...The resulting request object is returned but is NULL.
Any ideas as to what might work?
Thanks in advance.
renderRequest.getControllerContext().getServerInvocation().getServerContext().getClientRequest()http://docs.jboss.com/jbportal/v2.6.4/javadoc/org/jboss/portlet/JBossRenderRequest.html