1

Is there a way, using only the standard oracle JSR-286 classes, to obtain the HttpServletRequest behind a portlet request? Here is the liferay-specific method

HttpServletRequest httpRequest =
  PortalUtil.getOriginalServletRequest(
    PortalUtil.getHttpServletRequest(portletRenderRequest));

Many thanks in advance

Beryllium
  • 12,808
  • 10
  • 56
  • 86
LiamRyan
  • 1,892
  • 4
  • 32
  • 61

1 Answers1

1

To directly answer your question, I would try using the solution from Vamshi provided here. I think that solution still may be portlet container specific since I don't see any mention of this in the JSR-286 specification. I myself have only used a container specific solutions to this.

In a more general discussion I would direct you to Why is the servlet request not available in the portlet API Portlets are not servlets, so make sure you're not trying to use them in that way.

Community
  • 1
  • 1
Nick Roth
  • 3,057
  • 2
  • 15
  • 15
  • In the end I couldn't find a completely neutral way to accomplish this but instead created a wrapper class to encapsulate the container-specific methods – LiamRyan Jul 30 '13 at 09:52