There are some scenario when you want to get httpServletRequest or httpServletReponse from portletRequest.
IBM provides an utility class which gives you what you are looking for.
Yes, there is a PortletUtil class available in the com.ibm.ws.portletcontainer.portlet package, through which you can directly get httpServletRequest, httpServletResponse, ServletContext and many more servlet object you want.
Code to get HttpServletRequest from portletRequest/renderRequest/actionRequest.
HttpServletRequest httpServletRequest = PortletUtils.getHttpServletRequest(renderRequest);
There are couple of utility methods available in PortletUtil which gives you ServletContext, ServletConfig, PortletWindow, PortletApplicationDefinition etc.
IBM provides an utility class which gives you what you are looking for.
Yes, there is a PortletUtil class available in the com.ibm.ws.portletcontainer.portlet package, through which you can directly get httpServletRequest, httpServletResponse, ServletContext and many more servlet object you want.
Code to get HttpServletRequest from portletRequest/renderRequest/actionRequest.
HttpServletRequest httpServletRequest = PortletUtils.getHttpServletRequest(renderRequest);
There are couple of utility methods available in PortletUtil which gives you ServletContext, ServletConfig, PortletWindow, PortletApplicationDefinition etc.