문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top